The Israeli military said soldiers had conducted a "precise operation" based on intelligence that the hospital was being used by senior Hamas leaders, and were fired upon when they entered the compound.
"The troops responded with live fire and hits were identified. Our troops are continuing to operate in the area of the hospital," it saidin a statement.
Al Shifa, the Gaza Strip's biggest hospital before the war, is now one of the only healthcare facilities that is even partially operational in the north of the territory, and is also housing hundreds of displaced civilians.
"Suddenly, we started to hear sounds of explosions, several bombings, and soon tanks started to roll, they came from the western road and headed toward Al Shifa, then sounds of gunfire and explosions increased," Mohammad Ali, 32, a father of two, who lives around one kilometre from the hospital, told Reuters via a chat app.
"We don't know what is happening, but it looked as if it was a re-invasion of the Gaza City," he added, saying that the military activities began at around 1:00 a.m. (2300 GMT Sunday).
Gaza's Hamas-run health ministry said a fire broke out at the entrance of the hospital complex, causing cases of suffocation among displaced women and children sheltering in the hospital. It said communication had been cut off, with people trapped inside the surgery and emergency units of one of the buildings.
"There are casualties, including deaths and injuries, and it's impossible to rescue anyone due to the intensity of the fire and targeting of anyone approaching the windows," the ministry said.
The Israeli army dropped new leaflets around the hospital in Gaza City.
"To all those who exist or are displaced in Rimal and the displaced in Al Shifa and its vicinity: you are in a dangerous combat zone. The IDF is operating hard in its residential areas to destroy terror infrastructure," said the statement, which ordered the people to take the coastal road towards Al-Mawasi in the southern Gaza Strip.
The military issued grainy drone footage of the operation which it said showed troops coming under fire from a number of buildings in the hospital complex. Footage circulated on social media appeared to show an Israeli tank blocking the main gate of Al Shifa.
The military said troops had been instructed on the importance of operating cautiously as well as on measures to be taken to avoid harm to patients, civilians, medical staff and medical equipment, and said patients were not required to evacuate.
Not far from Al Shifa, Israeli army forces raided a school where displaced families were sheltering, and detained several men there, residents and Hamas media said. Residents reported tanks were also operating on the edge of the Beach refugee camp and said tanks fired shells at some buildings nearby.
Hamas said in a statement the Israeli military had committed a new crime by directly targeting the hospital buildings without caring about patients, medical staff or displaced people in it.
Israel came under fierce criticism last year when troops first raided the hospital, where they uncovered tunnels they said were used as command and control centres by Hamas. Hamas and medical staff deny the hospital has been used for military purposes or to shelter fighters.