Video obtained by Reuters showed water cannon hitting several bystanders and reporters outside the mosque after police issued a warning.
People coughed and choked after being hit by the spray.
Pro-democracy lawmakers from the Civic Party said in a statement that more than 10 people were hit by the jets outside the mosque, including a Civic Party Legislative Council member. "There was no protest action happening at the time," the party added.
In a statement, the city's police force said that the water cannon was sprayed "accidentally", adding that it had reached out to the mosque's imam and Muslim community leaders to "clarify the situation".