At least two people were killed and more than 60 injured, Mexico City Mayor Miguel Angel Mancera said at a news conference. The dead include a woman and a child. Officials earlier said at least four had been killed.
Mancera said 22 of those injured are in serious condition, while another third could be released from hospitals today.
He said 70 percent of the hospital had collapsed and the priority was to continue digging in search of any trapped survivors. Authorities have confirmed that none of the children registered in the hospital are trapped, but said it's possible that others who had come for appointments could be.
Thirty-five-year-old Felicitas Hernandez wept as she frantically questioned people outside the mostly collapsed building, hoping for word of her month-old baby, who had been hospitalized since birth with respiratory problems.
"They wouldn't let me sleep with him," said Hernandez, who said she had come to the city-run Maternity and Children's Hospital of Cuajimalpa because she had no money.
The explosion occurred at 7:05 a.m. (8:05 a.m. EST; 1305 GMT) when the tanker was making a routine delivery of gas to the hospital kitchen and gas started to leak. Witnesses said the tanker workers struggled frantically for 15 or 20 minutes to repair the leak while a large cloud of gas formed.
"The hose broke. The two gas workers tried to stop it, but they were very nervous. They yelled for people to get out," said Laura Diaz Pacheco, a laboratory technician.
"Everyone's initial reaction was to go inside, away from the gas," she added. "Maybe as many as 10 of us were able to get out ... The rest stayed inside."
Workers on the truck yelled: "Call the firefighters, call the firefighters!" said 66-year-old anesthesiologist Agustin Herrera. People started to evacuate the hospital, and then came the massive explosion that sent up an enormous fireball and plumes of dust and smoke.
Herrera saw injured mothers walking out carrying babies. He said there had been nine babies in the 35-bed hospital's nursery, one in very serious condition before the explosion.
"We avoided a much bigger tragedy because the oxygen tanks are right beside (the area) and they didn't explode," Herrera said. The most affected parts of the hospital were the neonatology, reception and emergency reception units, he added.
Miguel Angel Garcia, smoked a cigarette outside Hospital ABC-Santa Fe, trying to calm his nerves while he waited to see his wife and new baby daughter, who had been moved there.
Garcia, 22, had been driving a bus when he heard about the explosion at the hospital where his wife had given birth to their second child just the day before. He dropped off his passengers, then his bus and took off for the hospital.
"When I arrived and saw it in pieces, I thought the worst," Garcia said. He waited for an hour before authorities told him his wife and daughter had been taken to the Santa Fe hospital. A nurse there told him both were fine, but he hadn't been allowed to see them yet.
As the day wore on, people arrived offering diapers and baby formula. There was an hour-long wait to donate blood.
The driver and two employees were hospitalized but are also in custody, said a Mexico City government spokesman, who could not be named because she was not authorized to speak to the press.
The explosion sent a column of smoke billowing over the area on the western edge of Mexico's capital and television images showed much of the hospital collapsed, with firefighters trying to extinguish fires.
"The truck must have had some failure, the hose and that's what caused the explosion," Mancera said. He said that fire continued burning because firefighters recommended that they allow the truck's remaining gas to burn off. He said there was no risk of another explosion.
Ismael Garcia, 27, who lives a block from the hospital, said "there was a super explosion and everything caught on fire."
Garcia ran to the hospital and said he and others made their way to the nursery. "Fortunately, we were able to get eight babies out," he said.
Rafael Gonzalez of the Red Cross said one 27-year-old man arrived at the agency's hospital with burns over 90 percent of his body, and he was transferred to another hospital.
Pope Francis said through his official Twitter account that he was praying for the victims and their families.
The hospital, located in a middle class neighborhood, is next to a school.
Associated Press writers Peter Orsi and Katherine Corcoran in Mexico City contributed to this report.