The matter came to light after the woman, working as a canteen cashier inside Phase I of the 115-acre campus, filed a complaint with police in Hinjewadi on Tuesday.
Moving swiftly, police nabbed two people -- who are part of the contractual housekeeping staff of a partner of Infosys on the campus.
Inspector V. Khule told media persons that the 25-year-old woman had gone to the washroom when she was accosted by the duo and raped.
While one of the two accused raped her inside the lavatory, the other filmed the act on his mobile phone, and threatened to make the clip public if she informed anyone about the incident, Khule added.
The duo has been identified as Paritosh Baugh, 21, and Prakash Mahadik, 30 -- both working in the Infosys canteen at its campus at the Rajiv Gandhi IT Park here.
In a statement, Infosys said it was working closely with police to help in the investigation.
"We have stringent security measures and zero-tolerance policy against sexual harassment, extending to contractual staff too. The company will take necessary action as per policy," the statement assured.
The accused duo will be produced before a magistrate court.
(With inputs from agencies)