Images show several other officers also pointed guns at protesters who were chasing them with sticks and poles.
In another first, police deployed water cannon against protesters earlier in the day.
The protests began in the city's Tsuen Wan district and have since spread to the district of Tsim Sha Tsui.
Demonstrations were sparked by an extradition bill but have since morphed into broader anti-government protests, and developments on Sunday mark a serious escalation in the unrest.
Police told local media that the gunshot was fired as a warning to protesters, and that several officers had been taken to hospital as a result of the clashes.
But police Superintendent Leung Kwok-wing did not say where the shot was aimed.
Police also fired rubber bullets and tear gas, and used two water cannon vehicles to clear barricades and disperse crowds.
Images on social media show the vehicles being driven through the streets of Tsuen Wan, where a group of demonstrators had set up roadblocks and dug up bricks from the pavement.