Another blast hit the northern city of Mazar-i-Sharif at about the same time, killing four people.
The attacks appear to be of a sectarian nature unprecedented in recent Afghan history, correspondents say.
They coincided with the Shia Muslim festival of Ashura - the most important day in the Shia calendar and marked with a public holiday in Afghanistan.
Ashura is the climax of Muharram, the month of mourning for the martyrdom of the Prophet Muhammad's grandson.
The police have cordoned off all roads to the blast site in the medieval Murad Khani district where many Shias had gathered to commemorate Ashura at the Abu Fazal mosque.
Here, at an emergency surgical centre just 10 minutes from the site, people are gathered crying and wailing. I have heard women shouting: "My son is dead, my son is dead." I have seen people with charred clothing.
Security forces have been ferrying victims to waiting ambulances. There are many wounded too. Those who were there say there are a lot of casualties. People are gathering in front of the hospital and the police are on the streets around here controlling the traffic.
Children hit
The near-simultaneous explosions happened at about midday (07:30 GMT).
In Kabul, the bomb went off near a gathering of hundreds of Shias singing at the Abu Fazal shrine.
Fifty-four people were killed in the blast, said health ministry spokesman Norughli Kargar, while 150 were injured.
"It was very loud. My ears went deaf and I was blown three metres [yards]," Mustafa, who uses only one name, told Associated Press news agency.
"There was smoke and red blood on the floor of the shrine. There were people lying everywhere."
Amid the chaos straight after the blast, a young girl, dressed in a green shalwar kameez (traditional dress) smeared in blood, stood shrieking, surrounded by the crumpled, piled-up bodies of children, AFP reported.
Afghan President Hamid Karzai spoke of the unprecedented nature of the attack, saying it was "the first time that, on such an important religious day in Afghanistan, terrorism of that horrible nature is taking place".
No-one had claimed to have carried out the attacks, said Mohammad Zahir, head of Kabul's criminal investigation department.
A Taliban statement said the group had not been behind either incident.
Police said they foiled another attack elsewhere in the capital.
The bomb which exploded near the main mosque in Mazar-i-Sharif was apparently strapped to a bicycle, and went off shortly after the Kabul blast.
Balkh province Deputy Police Chief Abdul Raouf Taj said the device exploded as a convoy of Shias, shouting in celebration of Ashura, passed by, AP reported.
At least 17 people were injured.
Elsewhere, police said at least three people were wounded by a motorcycle bomb in the southern city of Kandahar, the Taliban's heartland - but it appears to have been unconnected to the other two attacks.
Rarity
Mohammad Bakir Shaikzada, the top Shiite cleric in Kabul, said he could not remember a similar attack on such a scale.
"This is a crime against Muslims during the holy day of Ashura," he told AP.
"We Muslims will never forget these attacks. It is the enemy of the Muslims who are carrying them out," he said, though he would not speculate on who might be responsible.
There are tensions between Sunni and minority Shia Muslims in Afghanistan, but violence of the type seen in Pakistan or Iraq is rare, the BBC's Quentin Sommerville in Kabul says.
Over the past decade Shias in Afghanistan have celebrated their festivals more confidently, openly and on a bigger scale than ever before.
The attacks come a day after an international conference on Afghanistan's future was held, in the German city of Bonn.
Pakistan boycotted the conference, after a Nato attack killed 24 of its troops at a checkpoint near the Afghan border last month.
Afghan security officials held their breath during the conference, our correspondent says, fearing there might an attack in Kabul to divert attention.
Afghan President Hamid Karzai has condemned the bomb attacks.
Are you in Kabul? Were you in the area? Did you witness anything? Send us your comments and experiences.