The minority Shiite community was left shocked and fearful after the unprecedented attack that highlighted sectarian tensions in the Sunni-dominated kingdom.
A witness, who said he saw two of the bodies, said one was a nine-year-old boy.
The policemen were killed when they came under "heavy gunfire" in Qassim region, north of the capital Riyadh, following the attack, said the interior ministry.
Two suspects were also killed, the ministry said.
Officers rounded up 15 suspects in several cities after the initial shooting late Monday in Eastern Province.
It came as Shiites prepared to mark the peak of Ashura, one of the holiest festivals of their faith.
Nine other worshippers were wounded in the attack.
Three assailants fired machineguns and pistols at the crowd in the village of Al-Dalwa, police told the official SPA news agency.
Footage posted online showed corpses lying in pools of blood after the attack in the oil-rich eastern region, where most of Saudi Arabia's two million Shiites live.
Bloodstains were seen on the carpet of the hall where the commemorations were being held.
Members of Saudi Arabia's Shiite minority clash sporadically with police in their region. But Monday's shooting was the first direct assault against them by unknown gunmen.
"It's very surprising because it's the first time," said Nasima al-Sada, a resident of Eastern Province. "We are shocked."
A witness, who reported hearing sustained gunfire during the attack, said the Shiite community feels helpless and fearful.
"All (the) people are really worried," he said, asking to remain anonymous.
Signup to our newsletter and follow us on Facebook and Twitter!
"We know they hate us," he said, referring to extremists.
Radical Sunni groups consider Shiites heretics and have targeted them elsewhere in the region, including attacks that killed more than 40 people in Baghdad in the 48 hours preceding the peak of Ashura on Tuesday.
The Ashura commemorations mark the killing of Imam Hussein, the grandson of the Prophet Mohammed, by the army of the Caliph Yazid in 680 AD -- an event that lies at the heart of Islam's sectarian divide into Shiite and Sunni sects.
'ATTACK ON OUR UNITY'
Saudi Arabia's supreme council of Sunni clerics condemned Monday's attack as "criminal", urging Saudis to "close ranks in standing up against the treacherous criminals".
"The enemies of our religion and our homeland aim to attack our unity and stability," the council said.
Predominantly-Shiite Iran condemned the attack.
"The Saudi government must ensure the security of religious ceremonies and identify and punish those responsible for this terrorist act," foreign ministry spokeswoman Marzieh Afkham said in a statement carried by ISNA news agency.
Protests and sporadic attacks on security forces have wracked Shiite areas of Eastern Province where the minority community complains of marginalisation.
Tensions escalated last month after a Saudi court handed down a death sentence against leading Shiite cleric Nimr al-Nimr, a driving force behind the demonstrations.
Protests erupted in the region in February 2011 after an outbreak of violence between Shiite pilgrims and religious police in the Muslim holy city of Medina.
They escalated after the kingdom's intervention in neighbouring Bahrain later that year to support a Sunni monarchy against an uprising led by the Shiite majority.
Hundreds were arrested in a subsequent crackdown, according to Amnesty International.
Nimr was shot and wounded during his arrest in July 2012, fanning tensions in the region.
Three days after Nimr's death sentence gunmen fired on a security patrol in the east, setting fire to an oil pipeline.
Another Saudi court then sentenced two more people to death for participating in Shiite protests, saying it issued the verdicts "as a deterrent to others".