UN secretary-general Ban Ki-moon said he made the late invitation to the talks in Switzerland from Wednesday after Tehran pledged to play a "positive and constructive role" in efforts to end Syria's worsening three-year civil war.
But the Syrian National Coalition promptly said it would withdraw from the negotiations unless the invitation to Iran - a key backer of Syrian President Bashar al-Assad - was retracted.
And the United States also weighed in, urging Iran to back calls for a transitional government in Syria or lose the invitation.
Talks between Assad's government and the opposition are due to start in Geneva on Friday.
Ban told a news conference he extended a late invitation to Tehran after intense talks over two days with Iranian Foreign Minister Mohammad Javad Zarif.
"Foreign Minister Zarif and I agree that the goal of the negotiations is to establish, by mutual consent, a transitional governing body with full executive powers," Ban told reporters.
But Louay Safi, spokesman for the Syrian National Coalition, which only decided on Saturday to attend the conference, announced on the group's Twitter account that the opposition would withdraw "unless Ban Ki-moon retracts Iran's invitation".
The threat came only hours after international leaders had hailed the coalition's decision to take part in negotiations.
The United States and other Western powers had opposed Iran's attendance at the meeting as long as it refused to accept a communique adopted by the major powers in Geneva on June 30, 2012, calling for a transitional government in Syria.
