The attack took place at the Shahcheragh shrine during the late afternoon, as pilgrims were visiting the Shiite holy site. The gunmen opened fire with Kalashnikov rifles after entering the courtyard of the shrine, unnamed security sources told Fars News.
One woman and two children are among the victims, and two gunmen have been arrested. A manhunt is underway for a third attacker.
Comment: WARNING GRAPHIC IMAGES TO FOLLOW:
Multiple Iranian news sources called the attack a "terrorist operation" by "Takfiri" extremists. This term refers to Sunni Islamic groups who violently target rival sects - in this case, Shia worshippers.
Shahcheragh is a holy site to Shias. Constructed in the 10th century AD, it houses the tombs of the sons of Musa al-Kazim, the seventh Imam of mainstream Shia Islam.
Wednesday's attack took place as Iran grapples with nationwide protests, which broke out following the death of 22-year-old Masha Amini in police custody last month. The Iranian authorities have said she suffered from a pre-existing medical condition, whereas some of her family members claim she was beaten to death.
A security source told Tasnim News Agency that the gunmen likely timed their attack to coincide with the unrest.