Two explosions struck the al-Balili mosque during prayers for the Eid al-Adha holiday.
The attack comes two days after Yemen's President Abdrabbuh Mansour Hadi returned to the southern city of Aden from exile in Saudi Arabia.
He had fled in March following gains by Houthi rebels, who have since been targeted by a Saudi-led coalition.
The coalition, along with loyalist forces, have pushed back the Houthis from some areas, including Aden.
However the Houthis - Shia Muslim rebels from the north of the country - still control the capital.
The UN says almost 4,900 people, including more than 2,200 civilians, have been killed in Yemen in fighting on the ground and air strikes since 26 March.
The Balili mosque is close to a police academy in Sanaa.
One suicide bomber reportedly detonated explosives inside the mosque and as people fled a second bomber set off explosives at the entrance.
Some reports have put the death toll higher, and many people have been injured.
Sanaa has been hit by a series of bomb attacks, many of them claimed by the so-called Islamic State militant group, which follows its own extreme version of Sunni Islam.
No-one has yet said they carried out the latest attack.
Eid al-Adha - the festival of sacrifice - is celebrated by Muslims worldwide.
It honours the willingness of Abraham to sacrifice his son as an act of submission to God's will.
Why is there fighting in Yemen?
- Northern Shia Muslim rebels known as Houthis, backed by forces loyal to Yemen's ex-president, took over parts of Yemen, including the capital, Sanaa, and forced the government into exile in March
- The rebels accused the government of corruption and of planning to marginalise their heartland within a proposed federal system
- Sunni neighbour Saudi Arabia, fearing a Shia takeover of Yemen, is leading a coalition in a military campaign to repel the rebels and restore the exiled government