Hamas denied the allegation and rejected the military's claim that it had used the hospital as a base for operations. It did not immediately comment on whether a leader from the group had been targeted, wounded or killed in the strike.
The surgery department serves half of Gaza's 2 million people.
Ayman Abu Obeid, a doctor wounded in the attack, said he was on an overnight shift when an explosion ripped through the room where he and others were sleeping."It went dark all at once,"he said from a hospital bed.
Three more Palestinians were killed later on Thursday in separate incidents. Commenting on a vehicle strike, the Israeli military said it hit a Hamas militant without giving further details.
Away from the hospital, a nine-month-old baby died from the cold as families fled worsening flooding.
Heavy rain last week flooded the tents of tens of thousands of people in the territory, where virtually the whole population has been displaced at least once by three years of Israeli bombardment.
Five people, including three children, died the day after the flooding when a sandy embankment collapsed onto their tents.
Hundreds of displaced families have been seen fleeing camps in parts of Gaza City and in central and northern areas of the territory after rainwater inundated them.
Around 65 percent of Gaza's people are still living displaced in tents or other temporary shelter, the U.N. humanitarian office OCHA said.