Officials said that a suicide bomber blew up a car in the city of Dammam in Eastern Province.
The Islamic State (IS) group has said that it was behind the attack in a statement released on social media.
At least 21 people were killed in a similar incident one week ago, when a suicide bomber struck during Friday prayers at a Shia mosque.
The attack at the Imam Ali mosque in the village of al-Qadeeh was the first to be claimed by the Saudi branch of IS, which was formally established last November.
In Dammam on Friday, a suicide bomber detonated his explosive device outside the al-Anoud mosque in a busy neighbourhood.
The two suicide bombs in seven days against Shia mosques are intended to inflame sectarian tension, the same tactic that IS uses in Iraq and elsewhere.
With a Saudi air campaign against Shia rebels in Yemen and a ratcheting up of the confrontation between the Saudis and Iran across the region, the jihadists are seizing the opportunity to sow more hatred.
Hardline Saudi preachers have long denounced the Shia, and that rhetoric has only grown fiercer. The Shia have called on the authorities to stem the flow of hate speech.
King Salman has promised to crush the militants and many Saudis have been expressing their solidarity with the Shia.
IS still has a very long way to go in its aim of destabilising Saudi Arabia through its sectarian divide, but it is using the only method it knows - sectarian violence.
A witness told Reuters news agency that he had seen a "quick explosion" and that he had been told that men had prevented the attacker from getting inside the mosque.
Security forces had become suspicious of a man in a car near the mosque and had gone to investigate it. It exploded as they approached the vehicle, according to the Saudi Press Agency, SPA.
One of those killed is believed to have been the driver of the car.
In a statement published online, IS said "a soldier of the Caliphate" was behind the attack on the Shia community. It identified the bomber as Abu Jandal al-Jazrawi.
Saudi Arabia has previously been threatened by IS. It is part of a US-led coalition against IS in Syria and Iraq.
The Saudis are also leading a coalition of Arab states in an air campaign against Shia rebels in Yemen.
The country's large Shia Muslim minority is mainly based in the Eastern Province, and there have been sporadic protests by Shia there to call for more rights.

Keane, 23, initially continued playing after a clash of heads during the 2-0 win over Rotherham on 20 February.
But he was substituted on 32 minutes and missed the next two matches, returning on 5 March against Blackburn.
"I felt alright to go on but I went down from a set play and said to the physio I couldn't see," Keane said.
In November 2015, the Football Association released new guidelines that stated "anyone with a suspected concussion must be immediately removed from play".
Keane added that it took him a while to get back to feeling "normal" following his injury.
"At first I was just really dizzy all the time and had no memory of the past week, really," he told BBC Radio Lancashire.
"The doctor asked me what year it was and I thought it was 1996. I was all over the place.
"I got treated really well at the hospital, had a few scans and then had to take my time to get back to normal and thankfully now I am alright.
"Looking back, [substituting me] was definitely the right thing to do.
"They have to be extra cautious when it comes to head injuries and rightly so because you can get massive injuries to your brain."
A bomb has exploded outside a Shia mosque in Saudi Arabia, reportedly killing at least four people.
[NEXT_CONCEPT]
Burnley defender Michael Keane has revealed he believed it was 1996 and had "no memory" of the previous week after suffering from concussion.