Also among the dead were two journalists and two professors. More than 40 people were wounded in the attack.
Saleban Olad Roble, the Somali sports minister, was also injured in the explosion.
Al-Arabiya, a Dubai-based television network, said Hasan al-Zubair, one of its cameramen, had also been killed in the blast.
The death toll is expected to rise.
Mohammed Ali Nur, the Somali ambassador to Kenya, told Al Jazeera: "Three of our ministers have been killed and our sport minister is in critical condition. In addition, 19 students have been killed and 40 other deaths have yet to be confirmed.
"What we understand is that someone blew himself up at the ceremony and the attack aimed to target government officials. We appeal to the international community to help our country in this time of need," he said.
Gelle said the bomber had been dressed in women's clothing, "complete with a veil and a female's shoes".
He told the Associated Press news agency that officials had a photograph of the man.
"The inhumane and cowardly attack would not deter the resolve and determination of the African Union to support the people of Somalia in their quest for peace and reconciliation"
The African Union
"What happened today is a national disaster," Gelle said.
Mohamed Adow, Al Jazeera's correspondent reporting from Kenya, said: "Reports say that a man who dressed as a woman managed to pass through security checkpoints and enter the hallways of the hotel where he detonated himself as the ceremony was taking place."
The African Union (AU) said the "inhumane and cowardly attack would not deter the resolve and determination of the African Union to support the people of Somalia in their quest for peace and reconciliation".
Wafula Wamunyini, the acting head of Amisom, the African Union's peacekeeping force, said the blast was "intended to intimidate and blackmail" the UN-backed government.
"We want to ensure everyone we are going to continue with our mission. We are going to continue providing our services," he told AFP.
Catherine Ashton, the EU foreign policy chief, said in a statement: "I condemn in the strongest possible terms this cowardly attack against civilians including students, doctors and journalists."
|Witnesses said the suicide attack appeared to have targeted government officials [Reuters]
Ashton also assured the transitional Somali government of the "EU's determination and commitment to support its efforts to fight extremism and reconstruct a peaceful Somalia".
A statement signed by the United Nations, the US, the EU and the Arab League said the attack would not deter the international community from continuing its support to the Somali government.
Suspicion for the blast immediately fell on the al-Shabab group, which killed Somalia's security minister and at least 30 other people in the central town of Baladwayne in June.
"There have been no claims of responsibility for the explosion, but it has the hallmarks of al-Shabab which has so far been carrying out attacks over recent months," Adow said.
David Shinn, a former US state department co-ordinator for Somalia, now a professor at George Washington University, told Al Jazeera that Thursday's attack was clearly an "intimidation tactic" by al-Shabab.
The attack was "truly a setback for the transitional federal government", he said, adding that more had to be done to cut off support al-Shabab receives from private sources outside of Somalia, and to prevent members of the diaspora from going to Somalia to join the group.
Al-Shabab and other anti-government groups regularly attack government troops and AU peacekeepers, in efforts to force them out of the country.
Al-Shabab and allied groups control much of southern and central Somalia and want to impose their version of sharia, or Islamic law, in the country.
Shinn said, however, that while al-Shabab could potentially win control of the country, that reign would be brief as the group did not represent the views of a majority of Somalis.
Somalia has not had an effective government since 1991, when Mohamed Siad Barre was overthrown by armed groups who then turned on each other.