Jassem Lateef al-Karkh, from the Baghdad health directorate, told reporters only seven babies could be saved and were taken to another ward in the Iraqi capital.
Health ministry spokesman Ahmed al-Rudeini told AFP the blaze at the Yarmuk hospital in west Baghdad was started by an electrical fault just after midnight (2100 GMT Tuesday).
"Twenty-nine women patients who were in the same ward were evacuated to other hospitals," he said.
Security services sealed off the area as forensic teams searched the gutted ward and angry relatives massed outside, waiting for information from the authorities.
More From This Section
The grief of the bereaved parents and relatives was compounded by the fact that the babies' young age and the effects of the fire made it very difficult to identify the bodies.
Umm Ahmed came to Yarmuk on Tuesday when a close relative of hers gave birth. The baby died in the inferno and the mother suffered burns, she said.
"I am looking for our child, they told me 'go find him in the fridge'," said the middle-aged woman.
Many of Baghdad's public hospitals are poorly maintained and offer sub-standard healthcare, forcing a number of Iraqis to seek private treatment or travel abroad.
The lack of adequate public services, such as quality medical care, electricity and water supply, has angered the public and led to a series of protests over the past year.
"The hospital is very old and doesn't have fire equipment," Karkh said.
The authorities were criticised in the aftermath of an attack in the Karrada district of Baghdad last month that left at least 323 people dead.
Witnesses complained that the fire brigade was unacceptably slow in responding to the emergency.
Iraq is one of the world's top oil producers but conflict and endemic graft have prevented that wealth from translating into better living conditions for Iraqis.