The attack happened while soldiers had gathered to receive their salaries at a barracks in the city of Aden, which is controlled by pro-government forces.
Some estimates put the death toll at 50, with as many as 70 injured.
It is not yet clear who carried out the attack but so-called Islamic State (IS) claimed responsibility.
The city has previously been targeted by jihadist groups in the region. In August, a suicide attack claimed by IS killed at least 60 people in the city.
One soldier at the base, Waleed Rashed, told the Associated Press news agency that he had arrived shortly after the attack and had seen private cars take injured people to hospital, before ambulances arrived.
"I could hear the wounded soldiers screaming for help," he said.
Yemen has been in constant conflict since March 2015, as forces allied to the exiled President, Abdrabbuh Mansour Hadi, battle the Houthi rebel movement.
Jihadist groups such as the so-called Islamic State and al-Qaeda have taken advantage of the conflict to carve out areas of control in the south of Yemen.
The scale of the humanitarian crisis is enormous - more than three million people have left their homes, and more than half the country's population does not have a secure source of food.
Pro-government forces, backed by a Saudi-led coalition, took control of Aden in the summer of 2015.
Since then, it has suffered a string of bombings which have killed up to several dozen at once.
The UN estimates that 7,270 people, mostly civilians, have been killed since the conflict began.
A suicide bomber has killed 45 soldiers and wounded 50 at an army base in southern Yemen, officials say.