The police are working to hunt down the sixth accused, who is on the run.
All five arrested are labourers from Tamil Nadu's Tiruppur district, Karnataka DGP Praveen Sood as quoted by NDTV.
A young woman was allegedly gangraped and her boyfriend was beaten up at Chamundi Hills, a forest that is a popular tourist spot and has a much-visited temple on the outskirts of Mysore.
The couple visited the site at 7:30 pm Tuesday.
They ended the evening in hospital with severe injuries. The young woman was allegedly gang-raped and her companion was beaten, said reports.
The assault began when the couple refused to hand over money to a group of men who followed them into the forest and surrounded them.
On refusing, the group beat up the young man and two of the men allegedly raped the woman.
The student's companion, the police said, watched in horror as she was raped, unable to come to her defence.
Police were earlier criticised for making no arrests.