The woman and her son were on the bridge which runs over Huntington Road, at around 2.30pm yesterday, when the man approached them and took hold of the child.
The mother shouted at the suspect and two men in high-viz jackets approached him.
The suspect then let go of the child and ran off.
A man has been arrested in connection with the incident and remains in police custody.
A North Yorkshire Police spokesman said: "Although the mother and child were both very shaken, no one was injured. The two men checked on the mother and stayed with her for a short time.
"Police enquiries began immediately, and a suspect was arrested later that day in connection with the incident. He remains in custody at this time.
"Anyone with information that could assist the investigation is asked to contact North Yorkshire Police on 101, quoting reference 12210088176. In particular, officers would like to speak to the two men in high-viz jackets, as they may be important witnesses.
"Residents can be reassured that York is a very safe place, and incidents of this nature are extremely rare. In this case, a suspect was quickly identified, arrested, and taken into custody.
"Enquiries are now ongoing to establish the full circumstances.”