The incident took place when the girl boarded the train from Patna and hardly half-an-hour after the departure, an unidentified man dragged her to the toilet and raped her there, they said.
The accused threatened the girl not to create an alarm, they said, adding a case was filed only after social activist Laxmi Gautam took her to GRP Mathura Junction to report the incident.
The girl had gone to meet her relatives here, they added.