The woman was alone in her house when a few men barged in and tried to rape her last night at Shekhupr Tengua village, said Circle Officer (city) Ramesh Chandra.
However, as the woman strongly resisted, the accused allegedly beat her, Chandra said.
"Two people have been detained for questioning and a probe is underway," he said.
The woman was admitted to a district hospital. Later, she was shifted to a hospital in Allahabad as her condition deteriorated, he said.