Taliban spokesman Zabihullah Mujahid had said on Saturday that a prayer ceremony would be held at the mosque for his mother following her recent death. He made no reference to this on Sunday as he tweeted that the blast had killed several civilians in the area.
A cultural commission official, who asked not to be named, told AFP that five people died and 11 were wounded, adding that the casualties included both civilians and Taliban members.
"We have also arrested three people in connection with the blast," he said.
According to the official, the device was placed at the entrance to the mosque and detonated as mourners were leaving after offering condolences to Mr Mujahid and his family.
Taliban fighters arriving at the hospital handed over their weapons and stripped off their body armour to go in to donate blood, and the hospital said on Twitter that four patients were being treated.
'Leave Afghanistan to Afghanistan'
The blast, which could be heard across the centre of the capital, came shortly after the new Taliban "interim government" staged a rally just outside the capital, from which they were driven out in 2001 in a US-led operation launched after 9/11.
A ban on unauthorised demonstrations has meant protests, many led by women, against Afghanistan's new masters have dwindled.
But Sunday's pro-Taliban rally in Kohdaman township in the hilly outskirts of Kabul was attended by 1,500 men and boys.
"This is the day we waited for," said Khalil Haqqani, the new minister for refugees who in 2011 was labelled a terrorist by the United States. He is a prominent leader of the Haqqani militant network founded by his brother, Jalaluddin.
"We have achieved our goal, but it requires protection," he told the gathering.
"My advice to the world is that they leave Afghanistan to Afghanistan."
Civilians killed in bomb blast at Kabul mosque
Pakistan's 'critical role'
The United States, European nations and other powers that were major donors to the former Afghan government before the Taliban takeover have warned they will not recognise the new administration - made up largely of hardliners and no women - unless it becomes more inclusive.
Afghanistan's neighbour Pakistan has urged the world to engage with the Taliban, while stopping short of itself recognising the new regime.
US Deputy Secretary of State Wendy Sherman, who will be in Islamabad next week, has pressed for an inclusive government in Kabul, and said Washington looks to "Pakistan to play a critical role in enabling that outcome".
But while hundreds turned out for Saturday's rally, the Taliban have been loath to allow similar gatherings by those opposed to their rule.
Last Thursday, the Taliban violently cracked down on a small women's rights demonstration in eastern Kabul, firing shots into the air to disperse protesters and pushing the women back
Isolated anti-Taliban rallies - with women at the forefront - were staged in cities around the country after the group seized power, including in the western city of Herat where two people were shot dead.
But protests have dwindled since the government issued an order banning demonstrations that do not have prior authorisation, warning of "severe legal action" for violators.