The alleged assault occurred on the footpath between High Ousegate and Coppergate at around 1.30pm on Friday 15 February 2013.
The child was not injured.
A 26-year-old woman was arrested at the scene of the incident and has been released on police bail as enquiries continue.
The woman was in company with another young child and a man when the incident occurred.
As part of the investigation officers need witnesses to contact them with information.
Detective Inspector Shaun Page, of York police, said:
We are treating this incident very seriously and need the assistance of any members of the public who were in the area at the time and saw what happened.
It was a busy time of day in a busy area of the city and someone must have seen something which can help the investigation.
If you have any information that can assist with our enquiries please get in touch with the police or Crimestoppers.
Anyone who can help the investigation is urged to contact North Yorkshire Police on 101 – select option 2 – and ask for York Protecting Vulnerable Persons Unit.
If you wish to remain anonymous, Crimestoppers can be contacted on 0800 555 111.