A top United Arab Emirates official was shot to death at the airport here today, apparently the unintended victim in an attempt to assassinate visiting Syrian Foreign Minister Abdel Halim Khaddam.

Khaddam, on a trip to discuss U.S. efforts to renew Middle East peace talks, had just entered the airport terminal with United Arab Emirates Minister of State Saif Ghobash when a gunman wearing flowing robes opened fire with a machine pistol.

Ghobash, 47, fell in the fusillade and died later at a hospital, shot three times. Khaddam, who was wounded in an assassination attempt last December by Palestinian extremists, ducked behind a flight of stairs and was unhurt.

The official Emirates news agency said the lone gunman seized three waiters in the terminal restaurant as hostages and ran for a parked Czechoslovak airliner. On the way, he added a six-man work crew to his hostages, the agency said, and then sought to board the plane. Finally, the gunman surrendered when security forces surrounded him.

[Khaddam, who cut short his tour and returned to Damascus, said there that: "The aggressor, who as arrested, came from Baghdad and was sent by the Iraqi regime to carry out a crime which above all benefits the Israeli enemy." Syria and Iraq have been at odds for years.]

It was widely rumored here that the assailant was Palestinian. There was no evidence of accomplices but tonight the sole road connecting the island capital of Abu Dhabi to the mainland was closed.

Khaddam, 44, is a close associate of Syrian President Hafez Assad and has been identified with his policies both during Syria's intervention in the Lebanese civil war and in the latest Arab efforts to bring the Palestine Liberation Organization into a negotiated Arab-Israeli settlement.

Palestinian extremists oppose both initiatives. The Baghdad-based Palestinian terrorist group Black June - named for the month last year when Syria entered the Lebanese war - claimed responsibility for the ambush of Khaddam on Dec. 2, when he received two gunshot wounds.

The political violence, common elsewhere in the Middle East is unusual in these small, conservative oil emirates - once known as the Trucial states - which contribute large sums to the war chests of the major Arab nations as well as of the PLO.

Despite the security concerns touched off when the Lufthansa airliner hijacked over the Mediterranean stopped in nearby Dubai on Oct. 15. Khaddam apparently was taking fewer precautions than usual.

Ghobash, the assult victim, was a brilliant and widely liked official, probably the best educated civil servant in this emergent but already wealthy state. He had risen to the No. 2 position in the Foreign Ministry.

He married a Russian while a student of engineering in Leningrad, and bringing her back to this politically conservative society may have damaged his political chances. Nevertheless, his Western orientation and his abilities brought him along quickly.

After formation of the United Arab Emirates in 1971, he served in the United Nations legation and emerged with increasing responsibilities for the Emirates' growing international influence after the 1973 oil boom.

More than most local officials, he was conscious of regional issues and he was known to be sympathetic to the Palestinian cause.

A member of the large Palestinian community that is lucratively employed here said, "I just pray the man they got is not a Palestinian."

While no widespread police activity was evident, the Emirates president, Sheik Zaid Nuhayan, came by helicopter from an island retreat for an emergency cabinet meeting that issued a warning about strict future measures.

The Emirates news agency's account of the gunman wearing the flowing white robes, the national dress here, caused particular concern. It said he carried a pistol and grenade in addition to the machine weapon. The traditional dress automatically entitles the wearer to deference from guards and other officials who in many cases are Arab visitors afraid to offend local people.

Both Khaddam and Ghobash were wearing business suits.