The incident took place when the 11-year-old girl went inside the temple for 'Darshan' of the Lord late on Friday night when the shrine was virtually deserted, they said.
Taking advantage of the situation, a 28-year-old youth escorted her to the bathing mandap of the Lord and raped her before fleeing.
The victim was rescued in a critical condition from the spot. Angry locals spotted the accused and thrashed him before handing him over to the police.
The girl was admitted to the SCB medical college at Cuttack as her condition worsened, police said.