Mr Ging said the fire caused by the phosphorus was very difficult to extinguish
The head of the UN aid agency in Gaza has accused the Israeli military of firing what was believed to be white phosphorus shells at its compound.
John Ging told the BBC that in spite of discussions with the Israeli liaison, "three rounds that emitted phosphorus" hit a corner of the Gaza City facility.
Israel's military said all weapons it used complied with international law.
Phosphorus shells are legal to use as a battlefield obscurant, but are banned from use where civilians may be harmed.
Human Rights Watch says it has observed "dozens and dozens" of white phosphorus shells being fired by Israel at the Gaza Strip - a heavily populated civilian area where the group says its use is prohibited.
UN accuses Israel over phosphorus
Palestinian medical officials said they had treated large numbers of casualties with unusual burns that were extremely painful to treat and could be consistent with exposure to white phosphorus (WP).
The Israeli military has declined to comment on specific munitions used during the 20-day offensive, but said any of its weapons were used in compliance with international law.
There is no way independently to explain the contradiction between both sides' reports, as Israel has prevented international journalists from entering Gaza since its offensive began on 27 December.
In an interview with the BBC, Mr Ging, director of operations in Gaza for the UN Relief and Works Agency (Unrwa), said the area surrounding its compound had been under "relentless artillery and tank bombardment all night and all day".
Some rounds, Mr Ging said, had struck a part of the compound where about 700 residents of nearby blocks of flats were taking shelter. Three people were injured in the bombardment.
Evidence of white phosphorus munitions used in Gaza, HRW says
"Then an hour later, in spite of our protests and real-time discussions with the Israeli liaison, three rounds that emitted phosphorous struck the other corner of the compound," he added.
The compound is Unrwa's main distribution hub in Gaza and Mr Ging said the shells set alight part of a warehouse in which there were stored thousands of tonnes of food and medicine, and the workshop area.
The fires then threatened to engulf five fuel tankers, which had been due to be sent out that morning, but could not leave because it was too dangerous outside.
"When the fires broke out, five of our brave staff dashed down there and moved the trucks out of the area, so we avoided a massive explosion," he said.
Mr Ging told CNN the fire was very difficult to extinguish because the smoke from WP becomes toxic if water is used.
Following the incident, UN Secretary General Ban Ki-moon - in Israel to push for a ceasefire in the Gaza Strip - expressed his "outrage" and demanded a full explanation from the Israeli government.
"The defence minister said to me it was a grave mistake and he took it very seriously. He assured me that extra attention will be paid to UN facilities and staff and this will not be repeated," Mr Ban said.
Israeli Prime Minister Ehud Olmert said the compound had been targeted after militants had opened fire from there.
"It is absolutely true that we were attacked from that place, but the consequences are very sad and we apologise for it," he said. "I don't think it should have happened and I'm very sorry."
White phosphorus sticks to human skin and will burn right through to the bone, causing death or leaving survivors with painful wounds which are slow to heal.
The international convention on the use of incendiary weapons says it should not be used where there is a possibility of hitting civilians. An Israeli military spokesman said it was investigating the reports, but reiterated earlier assurances about the legality of its weaponry.
The Israeli military may be using legal weapons, but it is using the weapons in an illegal manner
White phosphorus is permitted on the battlefield to make smoke screens to allow troops to move undetected, and also to impede infrared anti-tank weapons.
But its use in the densely populated areas of central Gaza City would be "unlawful", as it dispersal would be indiscriminate and could put civilians at risk, says Human Rights Watch military analyst Marc Garlasco.
"The Israeli military may be using legal weapons, but it is using the weapons in an illegal manner," Mr Garlasco told the BBC News website.
He said he had observed dozens and dozens WP shells used by the Israeli army over Gaza since 27 December, both ground-burst shells and air-burst, scattering distinctive burning lumps of phosphorus which left white smoke trails.
"We are absolutely certain this is white phosphorus, this is the singular, unique visual signature of white phosphorus on the battlefield. Not only have I seen it for myself but I have checked with US artillery," Mr Garlasco added.
Mr Garlasco also examined a press photograph which showed a burning lump of matter in the UN compound. He said it "definitely appeared" to be WP, but that the photo was not detailed enough to say with complete certainty.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.