The US Geological Survey said the quake struck at 03:20 local time four miles north-west of the town of American Canyon, at a depth of 6.7 miles.
At least 87 people have been taken to hospital in the Napa area, with three of them seriously injured.
California Governor Jerry Brown has declared a state of emergency in order to deal with the effects of the quake.
Officials in Napa said in a statement that the quake had destroyed four mobile homes and made 16 buildings “uninhabitable”, as well as causing “approximately 50” gas main breaks and around 30 leaks from water mains.
Three historic buildings in the town had been hit and two commercial buildings “severely damaged”, the statement went on.
More than 10,000 households were without power in Napa, about six miles from the earthquake’s epicenter, and the surrounding area, the Pacific Gas and Electric Company said.
A Red Cross evacuation centre has been set up in a church in the city.
The California Highway Patrol in the San Francisco Bay area tweeted that it was “checking over crossings and bridges for obvious signs of structural integrity”, and asked residents to report any signs of problems.
The site of the earthquake was 51 miles from Sacramento and about 30 miles north-east of San Francisco, where many Twitter users say the earthquake woke them up.
Numerous small aftershocks were also reported on Sunday.
California lies on the San Andreas Fault, which forms the tectonic boundary between the Pacific Plate and the North American Plate, two of the large moving plates that form the Earth’s crust.
The San Francisco earthquake of 1906 and subsequent fires devastated the city.
In 1989, a powerful earthquake struck San Francisco, killing more than 60 people and injuring hundreds.
Bk3nz-3Tu8QImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…