A 19-year-old man has been arrested after the attack at Poway, north of the city of San Diego.
The synagogue had been hosting a Passover celebration when the shooting took place, reports said.
Police have not suggested a motive but US President Donald Trump said the attack "looks like a hate crime".
The shooting comes six months after a gun attack killed 11 people at the Tree of Life synagogue in Pittsburgh. It was the worst anti-Semitic attack in recent US history.