DCP Railways (Central) Rupali Ambure told PTI the woman was raped in the RPF cabin at Diva here on January 14.
However, she lodged a complaint recently after which the Thane Railway Police registered offence against the four accused.
The DCP said the accused have been booked under sections 376-d (rape by one or more persons) 328 r/w 34 of the IPC.
The case has been transferred to the Thane city police as the alleged offence sight falls under the commissionerate.
In a late night press release, police gave the names of the accused as P K Singh, Bhagel Singh, Deepak Rathod and B K Singh.
A probe is on but no arrest has been made so far, Thane city police PRO Sukhada Narkar said in the release.