By Tim Cocks
"The gunmen attacked the car with our employees at around 5 p.m. (1400 GMT) while they were travelling to visit Kadhimiya shrine," embassy spokesman Sayed Tasleem told Reuters, referring to a Shi'ite shrine in northwest Baghdad.
He said two of the victims were badly wounded.
Iraqi police confirmed the attack but did not have any further details or say who they thought could be behind it. Iran's official IRNA news agency blamed the U.S. military.
"American agents carried out terror attacks on Iranian embassy staff in Baghdad," IRNA quoted an unnamed source as saying. "Iran will seriously follow this case and wants those responsible … to be arrested and punished."
A U.S. military spokesman in Baghdad said the allegation was "completely ridiculous".
"We're not in the business of assassination," Major Brad Leighton said. "I don't know why the Iranian press would report that. Obviously, they've got an agenda."
Diplomats have been a favourite target of militants in Iraq. Poland's ambassador suffered severe burns in a bomb attack in Baghdad in October last year.
Iran is one of the few countries in the Gulf region with a fully fledged embassy in Iraq.
Most Gulf states have no permanent representatives in Baghdad and many regional diplomats have stayed away from the country since a suicide car bomber attacked the Jordanian embassy in 2003, killing 17 people. Egypt pulled out when its ambassador was kidnapped and then killed in 2005. (Additional reporting by Parisa Hafezi in Tehran)