Obama is to visit the oil-rich desert kingdom on April 21 for a tense summit of Saudi Arabia and the other five Gulf Arab states at a time of crisis.
While maintaining a public show of unity with Washington, Saudi officials are privately angry about what they perceive as Obama's outreach to their foe Iran.
And he has been criticized at home and in the Middle East for his reluctance to take tough action against Syria's Bashar al-Assad, allowing Russia to seize the initiative.
"The Department of State urges US citizens to carefully consider the risks of traveling to Saudi Arabia," it said.
Also Read
"There continue to be reports of threats against US citizens and other Westerners, as well as locations frequented by them."
The statement, which replaces an earlier warning issued in September last year, warns that both Al-Qaeda and the Islamic State group are planning attacks in the kingdom.
"Possible targets include housing compounds, hotels, restaurants, shopping areas, international schools and other facilities where Westerners congregate," it said.
The warning says US officials are banned from going within 50 miles (80 kilometers) of the Yemen border and urges Americans to stick to hotels and housing compounds.