Indian media reported that the fire first broke out in the intensive care unit of the infant ward around 10:30pm local time (5:00pm GMT).
Local officials believe the fire was caused by an electrical short circuit or other malfunction in the apparatus used to increase oxygen levels in the ward.
Indian Prime Minister Narendra Modi posted an online message calling the death “heartbreaking”.
“My deepest condolences to those who lost their innocent children in this. I pray to God to give them the strength to bear this huge loss,” he wrote.
Uttar Pradesh government officials told reporters on Saturday that three bodies have yet to be identified.
State Deputy Chief Minister Brajesh Pathak said a safety inspection of the government hospital was conducted in February and a fire drill was conducted in June.
Government officials announced 500,000 rupees (£4,600; $5,900) in compensation to the families of those killed.
This is the second major hospital fire in India in six months in which newborns have died. in may six babies died in a fire at a private neonatal facility in Delhi.