It was the latest in a series of bombings and shootings linked to the Sunni extremist group in Saudi Arabia over the past year.
The murders yesterday, in the Qatif area of Eastern Province, came two days after the start of commemorations of Ashura, one of the holiest occasions for the Shiite faith, a minority in Sunni-dominated Saudi Arabia.
"As (a) result of his shooting, five citizens... Were killed, including a woman. Nine others were wounded," an interior ministry spokesman said in a statement.
Police intervened and opened fire, killing the suspect, the spokesman said without giving details about the attacker.
"The situation is still under investigation," he said.
State television earlier reported that the gunman was 20 years old.
A group calling itself Islamic State-Bahrain State said in a communique that one of its "soldiers", Shughaa al-Dosari, "attacked a Shiite infidel temple with an automatic weapon" in Saihat.
During Ashura last year, gunmen killed seven Shiite worshippers, including children, in the eastern town of Al-Dalwa.
A witness to yesterday's attack, Ali al-Bahrani, told AFP that "a gunman began randomly shooting at people attending a sermon".
He said that a woman was killed.
Hussein al-Nemr, a local resident, said the shooting was one of three incidents yesterday evening.
