The Daesh (ISIL or ISIS) terrorist group claimed responsibility for the attack, which followed another blast claimed by the group in Kabul last week, which killed around 30 people near a Shia shrine as the city celebrated Nawruz, the Persian new year.
Deputy police chief Aminullah Amin said two bombers had tried to enter the mosque but were challenged by guards at the site who opened fire on them.
Health officials said one person was confirmed dead, with eight wounded but the final casualty figure may change, Reuters reported.
Herat, one of the most prosperous cities in Afghanistan, has seen periodic episodes of violence but has not suffered the same level of attacks as the capital Kabul.
While sectarian violence in mainly Sunni Muslim Afghanistan was previously rare, a series of attacks over recent years, many claimed by Daesh, have killed hundreds of Shias, many from the Hazara ethnic minority.
The violence has gone on alongside a general deterioration in security in Afghanistan as Taliban insurgents have fought government forces across much of the country, killing thousands of civilians every year.