The officer returned fire.
Police say a bullet grazed the officer's head. He is hospitalized in stable condition. Williams was not hurt.
Williams is disputing the officer's version of events, saying the officer threatened his life first.
Williams has been arrested on charges including attempted murder and assaulting a police officer.