The airport serves as a base for Ethiopian troops who helped the interim Somali government overthrow Islamic courts fighters late last month.
The UN delegation, from the UN refugee agency and the office for the co-ordination of humanitarian affairs, was taken to the UN compound in Mogadishu where they were meeting with Somali officials as planned.
Witnesses said Somali police forces and Ethiopian troops sealed off the airport and surrounding neighbourhoods after the attack and then assaulted civilians.
A cafe owner at the airport, who asked to remain anonymous, said he had been shot by police.
"Peace is possible if the interests of US and the Ethiopians are removed"
Ahmed, Bossaso, Somalia
Send us your views
He said: "Ethiopian troops and Somali police came into my restaurant and beat us very badly. I sustained a small gunshot wound, but I am getting treatment in the hospital."
A police official, who also requested anonymity, said "the beating was a case of mistaken identity".
Muhamoud Yassin, a taxi driver, said the situation remained tense: "People are not allowed to and from the facility. There is a heavy security presence."
The attack came a day after a first batch of Ethiopian troops began pulling out of Mogadishu, even though a proposed 7,600-strong African Union peacekeeping force has yet to be deployed.
In a separate development, The Washington Post, citing unnamed US officials, said that a US AC-130 gunship had fired at suspected al-Qaeda operatives in southern Somalia on Monday.
If confirmed, it would be the second US attack this month in southern Somalia using an AC-130, a fixed-wing aircraft with rapid-firing guns.
On January 8 the US attacked a site where senior al-Qaeda operatives were believed to be hiding.
Neither Hussein Mohamed Aidid, the Somali deputy prime minister, or Abdirahman Dinari, a government spokesman, could confirm the attack.
Aidid said: "This is just speculation and we have not received any information."