Ola Adnan Harb al-Kurd, who was nine months pregnant, barely survived a punishing night of missile strikes that rescue services across the Hamas-run territory said killed more than 24 people, including six members of the same family.
But by the time Kurd reached Al-Awda Hospital, she was "almost dead", according to surgeon Akram Hussein.
Doctors were unable to save the mother, but performed an ultrasound that detected the baby's heartbeat.
They quickly staged an emergency cesarean section "and extracted the fetus," the surgeon told AFP.
The newborn was initially in critical condition, but after receiving oxygen and medical attention was stabilised, said Raed al-Saudi, head of the hospital's obstetrics and gynaecology department.
He was placed in an incubator and transferred to Al-Aqsa Hospital in Deir el-Balah.
Kurd was among three women and a child killed by an Israeli missile fired on the Nuseirat refugee camp in central Gaza, according to a medical official at Al-Awda Hospital. Her husband was also wounded in the strike on the family home.
Israel has not confirmed individual strikes, but a military statement said troops were "conducting targeted raids on terrorist infrastructure sites" in central Gaza.
Israel has stepped up its offensive in several parts of the territory in line with Prime Minister Benjamin Netanyahu's order to increase pressure on Hamas following the Palestinian militants' attacks on southern Israel on October 7.
One man was killed in a drone hit while riding a bicycle on a street near the southern city of Khan Yunis, the Palestinian Red Crescent said.
Air strikes on two homes in Gaza City in the north each left six dead, according to the civil defence agency and paramedics.
Israel's military statement said "troops eliminated a number of terrorists in several different encounters" and had launched an operation on the Tal al-Sultan refugee camp near the southern city of Rafah.
The war in Gaza has made childbirth increasingly perilous, with pregnant women facing not only near-daily strikes that hamper access to health facilities, but also widespread food insecurity, degrading sanitary conditions and water scarcity.
The few hospitals that are still working have been stretched to breaking point, according to humanitarian groups.
Pre-term deliveries and maternal complications, including eclampsia, haemorrhage and sepsis, have been rising, Doctors Without Borders said this week.