Thirty-year-old Ng Lai-ying, who took part in a protest against mainland Chinese cross-border traders in March, was sentenced to three months and 15 days for the charge of "assaulting a police officer".
Ng, who works as a clerk, was bailed pending an appeal.
She was found guilty of using her chest to bump against the arm of chief inspector Chan Ka-po during the protest in the rural Yuen Long district of the city, where chaotic scenes broke out over the number of traders shopping there.
Chan accused Ng of bumping him with her breast.
More From This Section
"If I do not hand down a deterring sentence, the public might mistakenly think it is a trivial matter to assault police officers during protests," magistrate Michael Chan said, according to the Post.
The magistrate had previously said Ng "used her female identity to trump up the allegation that the officer had molested" her, calling that a malicious act and harming the officer's reputation, the Post said.
Co-defendant Poon Tsz-hang, who was sentenced to jail for five months and a week, said he "respected the court's decision".
A 14-year-old boy, whose name cannot be released, was sent to a rehabilitation centre.
The third, Kwong Chun-lung, was ordered to attend a detention centre.
The trio were all found guilty of "obstructing a police officer in the due execution of his duty" and "assaulting a police officer". They were also bailed pending an appeal.
Hong Kong opened up to Chinese tourists in 2003 in a bid to revive its economy after an outbreak of the respiratory disease SARS, allowing mainland Chinese to visit as individual travellers rather than as part of an organised tour.