A woman has been charged after a teenage girl was allegedly sexually assaulted on her way home from school at a train station in Melbourne's west.

The 17-year-old was leaving Newport station at 2pm on May 1 when she was attacked from behind by an unknown woman.

Transit Crime Investigation Unit detectives have charged a 32-year-old Williamstown woman with sexual assault after a public appeal for information.

The woman presented herself to a police station on Tuesday afternoon. She has been bailed to appear in Melbourne Magistrates Court on August 17.

Police had earlier released CCTV footage showing a woman at the station taken immediately before the incident.