Crowds began gathering outside the Deepvihar High School in the city of Vasco da Gama on Monday night after news of the attack emerged, prompting police to arrest the headmistress on charges of neglect as well as appeal for calm.
A massive manhunt has been launched to trace the attacker, thought to be in his early 20s, who managed to get into the premises despite security guards posted at the school gate.
A police official, speaking on condition of anonymity, told AFP that the youngster was raped after being dragged inside the toilet situated next to the headmistress's office during a break in classes.
Police were alerted after the girl complained of pain and was given a medical examination.
The girl was taken to hospital and has since been discharged, a charity worker accompanying her told AFP. "She is fine now and recuperating at home," she said.
The victim's identity has been protected in line with Indian law.
Thousands of people surrounded the school on Monday night, shouting to demand the arrest of the headmistress and the perpetrator.
Demonstrations then spread to other parts of the city on Tuesday, with shops and businesses closing in protest. Police were due to hold a press conference on the incident in the late afternoon.
Goa's Chief Minister Manohar Parrikar visited the spot to try and calm the tense gathering.
"We will not spare the accused and anyone involved in this crime," he told the crowds, after which the headmistress was detained. She was later arrested for alleged negligence of duty, the police official said.
The case has been transferred from local police to the state crime branch, which has taken up the help of a teacher to draw a sketch of the accused, seen loitering in the school compound.
The attack comes after the gang-rape of a student on a bus in New Delhi last month sparked nationwide protests and fuelled anger across India over the alarming incidence of sexual assault.
Five men and a teenager have been charged with the rape and murder of the 23-year-old woman, who died 13 days later in a Singapore hospital from horrific injuries.
Police say the suspects lured the woman and her male companion onto a private bus in the capital when the pair were returning home from the cinema.
The group allegedly beat the man and raped the young woman in the back of the bus while driving around the city for about 45 minutes.
They also sexually assaulted the woman with a metal bar, leaving her with severe intestinal injuries, before throwing her out of the vehicle.
Protesters across the country have called for tougher laws to punish rapists, including the introduction of capital punishment in the most extreme cases.
Also in Goa on Monday, a policeman was arrested after being accused of sexually abusing sex workers, who said he and two other policemen -- all now suspended -- had been exploiting them in return for protection of their trade.