Reports say one woman and two children are among the dead.
At least 40 people are also said to have been injured.
According to media reports citing eye witnesses, the terrorists entered the shrine, known as Shah Charagh which is open to the public, around 17:45 local time on Thursday and opened fired on the pilgrims.
The reports said the police arrested two of the assailants and are pursuing a third, who escaped after the attack.
Tasnim News Agency also cited “informed security sources” as saying that the attack has been an act of terrorism by Takfiri-Wahhabi elements – a label frequently given to elements linked to the ideology promoted by Saudi Arabia.
Tasnim linked the incident to the recent unrest and deadly riots in the country.
Meanwhile Nournews, a media outlet affiliated with Iran’s Supreme National Security Council reported that those behind the terror attack were non-Iranian.