Ging, a driver and a security official were travelling in an armoured vehicle marked with UN livery when three gunmen jumped out of a white Subaru and opened fire, he said.
"They tried to force open the car, but our driver extracted himself from that situation," and sped away from the scene as the gunmen continued firing, he said.
Ging said the attack was a kidnap attempt, and that the UNRWA mission would consider sending home foreign staffers in the wake of the attack.
"This [attack] is unprecedented because our vehicles were so clearly marked, and the firing was directed at the vehicles themselves. So this has very serious security implications for us and for our staff," Ging said.
The UNRWA effort in Gaza is overwhelmingly staffed by Palestinians, with eight foreigners working for the mission.
Such a direct and bold gun attack against foreigners in the Gaza Strip is rare, although around 20 foreign journalists and aid workers have been kidnapped and released unharmed in the past year.
The latest Westerner to have been kidnapped, journalist Alan Johnston, has not been seen since he left the British Broadcasting Corporation (BBC) bureau in Gaza City on Monday afternoon.
UNRWA is the largest UN agency with more than 25,000 employees, and was established in the aftermath of the 1948 Arab-Israeli war to provide relief for 700,000 Palestinian refugees affected by the war.
Today the agency provides education, health, relief and social services to more than 4.3 million registered Palestinian refugees in Jordan, Lebanon, Syria, the West Bank and the Gaza Strip.
In the Gaza Strip alone, UNRWA cares for nearly one million refugees.
Ging said the UNRWA operation needed to continue, with thousands of Palestinians reliant on the relief agency's work.
"The one million refugees depending on us need our operation, and that's why it's so urgent that security be brought under control. We need law and order here in the Gaza Strip first and foremost," he said.