UN spokesman Chris Gunness said “the world stands disgraced” by the attack, in which 15 were reported killed.
The Israeli military said an initial inquiry suggested soldiers responded after militants had fired mortar shells “from the vicinity of the [UN] school”.
Some 1,200 Palestinians and 55 Israelis have been killed in the conflict.
Most of the Palestinian deaths have been civilians.
Some 53 Israeli soldiers have been killed along with two civilians. A Thai worker in Israel has also died.
Israel launched its offensive in Gaza after a surge in rocket fire from the territory.
Hamas, which controls Gaza, says it will not stop fighting until the blockade, maintained by both Israel and Egypt, is lifted.
The current conflict is now the longest between Israel and militants from Gaza.
A 2012 offensive lasted for eight days, and the 2008 conflict went on for 22 days.
Chris Gunness from the UN Relief and Works Agency (UNRWA) said that Israel had been told 17 times that the school in the Jabaliya refugee camp was housing the displaced.
“The last time was hours before the fatal attack,” he said.
“Our initial assessment is that it was Israeli artillery that hit our school.”
He said there were “multiple deaths” including women and children, adding that the attack caused “universal shame”.
Images from the school showed large holes in the walls and roof.
Bob Turner, UNRWA’s Gaza director, said the UN was “confident” Israel was responsible.
He said UN workers had collected fragments of projectiles that suggested they were artillery shells fired from Israeli positions to the north-east of the school.
The Israeli military said the incident was under review.
The military said in a statement that its “initial inquiry suggests that militants fired mortars earlier this morning from the vicinity of UNRWA school in Jebalia”.
It said soldiers “responded by firing towards the origin of fire”.
Israel has repeatedly accused Hamas of using schools and civilian areas as bases to launch attacks.
Last week, another UN-run school was hit, with Palestinians saying at least 15 people were killed.
But the Israeli military denied the killings, saying a single “errant” shell had landed in an empty courtyard.
Israel stepped up the intensity of its strikes on Tuesday and overnight into Wednesday, saying it had hit a number of tunnels dug by militants to attack Israel.
But the Israeli military said rockets continued to land in Israel from Gaza.
Palestinian officials said Gaza’s port had been destroyed on Tuesday and its only power plant had been put out of action.
Meanwhile, Palestinian factions Hamas, Fatah and Islamic Jihad are expected to meet in Cairo later to discuss a ceasefire.
9QtkzGrUZlsThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…