The Lebanese army said the first blast was caused by a motorcyclist who blew himself up moments before a suicide bomber driving a four-wheel-drive detonated his payload in southern Beirut.
The mid-morning attack, which also wounded almost 150 people in a stronghold of the Hezbollah movement, is the first time the Iranian embassy has been targeted.
The blasts ripped the facades off surrounding buildings, strewing rubble and glass on streets that were stained with blood.
Residents walked dazed past charred cars and trees, as soldiers and Hezbollah security men tried to secure the area.
The attack follows two other bombings this year in Hezbollah bastions in southern Beirut, amid rising tensions over the conflict in neighbouring Syria.
Iran is one of Syria's closest allies, and is the key sponsor of Hezbollah, which has dispatched thousands of fighters to bolster the regime as it battles a 32-month uprising.
Damascus quickly condemned today's attack.
"The Syrian government firmly condemns the terrorist attack carried out near the Iranian embassy in Beirut," state television said.
It said an "odour of petrodollars comes from all the terrorist acts against Syria, Lebanon and Iraq," an apparent reference to Saudi Arabia and Qatar, which back Syria's uprising.
Iran also condemned the attack, accusing Israel and its "mercenaries" of responsibility. Israel immediately denied involvement.
Britain and France issued swift statements slamming the bombings, which London described as a "shocking terrorist attack".
The blasts were claimed by the Abdullah Azzam Brigades, a jihadist group linked to Al-Qaeda that has previously fired rockets at Israel from Lebanese territory.
"This is a double martyrdom operation carried out by two heros from the heroic Sunnis of Lebanon," Sirajeddin Zreikat, a member of the group, wrote on his Twitter account.
The Lebanese army confirmed the attack was a double suicide bombing, and the health ministry said 23 people were dead and 146 wounded.
"The first explosion was caused by a suicide attacker who was driving a motorcycle and blew himself up. The second suicide attacker was driving a 4x4 vehicle and also detonated himself," the army said.
Iran's ambassador to Beirut, Ghazanfar Rokn-Abadi, said all staff inside the embassy at the time of the attack escaped unharmed.