The tourists were attacked when they were on their way to a temple in the holy town of Pushkar on Monday evening.
The woman said her clothes were torn off and her companion was beaten up when he protested and tried to stop the men from attacking her.
Pushkar is a popular destination among foreign tourists. The town hosts an annual camel fair.
The men who attacked the couple "were consuming liquor", Indian media reports quoted superintendent of police Nitindeep Balaggan as saying.
"The goons attempted to molest a woman tourist and tore her clothes off. They inflicted serious injuries upon her male friend when he tried to intervene," Mr Balaggan told the Hindustan Times.
Indian media reports said the woman was Spanish. The nationality of her companion was not yet clear.
Increasing numbers of rapes and attacks are being reported and highlighted in India, prompting widespread outrage.
Last year, five men were arrested in Kolkata (Calcutta) and charged with kidnapping and repeatedly raping a Japanese student.
In June 2013, a 30-year-old American woman was gang-raped in the northern state of Himachal Pradesh.

Seven people were charged with stealing and conspiracy to steal a baby from the Komfo Anokye Teaching Hospital earlier in February.
Suwaiba Mumuni, whose baby is among the five missing, told the BBC she believes her child is still alive.
The hospital, the second largest in Ghana, has denied the allegations.
The BBC's Sammy Darko in the capital, Accra, says the case of the missing babies has caused outrage in Ghana.
Youths stormed the hospital in Kumasi, 270km (167 miles) north-west of Accra, on Thursday, temporarily closing the maternity wards, he says.
Ms Mumuni said after she gave birth on 5 February, she was told that her baby was stillborn and it was taken away by attendants.
When her relatives arrived later in the day to collect the body for burial, it could not be found, she said.
"The only news I am expecting to hear is that my baby has been found," Ms Mumuni told the BBC.
"They told me my baby is dead, but they have not been able to produce the body... I am confident my baby is alive."
The bodies of another four babies allegedly delivered stillborn that day are also missing.
"The ministry will leave no stone unturned until the truth is established," Health Minister Sherry Ayittey said in a statement.
Ms Ayittey said the hospital had 14 working days to find the bodies of the babies "for burial by the families".
Staff at the hospital, who spoke on condition of anonymity, said they often felt overwhelmed and there were inadequate resources to deal with demand.
Our reporter says the seven people charged on Thursday over Ms Mumuni's missing baby were given bail.

The former Manchester United players say their St. Michael's development would transform Jackson's Row near Manchester Town Hall.
Their Â£200m proposal includes a five-star hotel, apartments, offices and restaurants.
Plans are expected to be submitted to the city council later this year.
Giggs and Neville revealed details of their proposed development in July.
A synagogue would be rebuilt, but the 19th Century Sir Ralph Abercromby pub and the former Bootle Street police station would be demolished.
The online petition claims two tower blocks at the centre of the scheme "are grossly inappropriate to this location".
"They don't reflect, respond to or respect their surroundings," the petition continues. "They are in the wrong place, out of proportion and overwhelm everything around them, including the town hall, central library and both old and new buildings in the city centre."
Stretford resident Paul Moore, who has signed the petition, said: "I work and socialise in Manchester city centre and think the history and uniqueness of the city is being lost by these glass soulless towers. To demolish historic buildings to make way for these is a crime."
Matt Harby said: "I'm not opposed to the designs per se (I've seen a lot worse), but this is completely the wrong site for it."
Neville and Giggs were involved in the development of Hotel Football, near their former club's Old Trafford stadium.
They are also turning the former Manchester Stock Exchange into a luxury hotel.
Before renovation started earlier this year, they allowed homeless people to stay in the building.
A foreign couple has been attacked by a group of "drunk men" in the northern Indian state of Rajasthan, police said.
[NEXT_CONCEPT]
Ghana's health minister has given a hospital in the city of Kumasi 14 days to produce the bodies of five babies that were allegedly stillborn.
[NEXT_CONCEPT]
More than 1,500 people have signed a petition against Gary Neville and Ryan Giggs' "grossly inappropriate" plans to redevelop part of central Manchester.