The men, aged in their twenties, filmed the alleged assault, which occurred on Sunday at one of the IT firm's offices in the western city of Pune in Maharashtra state, officers said.
"The woman works as a cashier at the canteen and had gone to the washroom in the evening when one of the men assaulted her while the other filmed it," Suresh Bhonsle, a senior inspector for Pune police, told AFP.
India court orders seven to hang for Nepali woman's rape, murder
"They have been arrested and produced before the court," he said, adding that the men also worked in the canteen, as a cleaner and a waiter.
Infosys, India's second largest IT services exporter, said in a statement emailed to AFP that it was investigating the "alleged incident at our Pune campus involving our partners' contractual staff".
"We have stringent security measures in place on all our campuses and have a zero tolerance policy against sexual harassment which extends to our contractual staff as well.
India lacks political will to end rape crisis: victim's father
"The company will take necessary action as per policy," the statement said.
The incident is the latest in a series of high-profile cases to have shone a spotlight on women's safety in India in recent years.
No shame in naming daughter: gang-rape victim's mother
It comes a week after lawmakers passed a bill allowing harsher punishments for juveniles aged 16-18 following an outcry over the release of a young rapist who served three years in a detention facility for his part in a notorious gang rape in 2012.
Earlier this month, an Indian court sentenced seven men to death after they were convicted of the rape and murder of a Nepalese woman suffering from mental illness, reports said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ