The suspects entered the Capri Motel, located at 2380 El Camino Real, by jumping over a back fence at about noon, according to police.
They went into the motel, brandished a gun and demanded cash, police said.
After taking about $500, the two men fled over the back fence, and a witness saw them get into a dark blue, older-model sedan, possibly a Toyota, police said.
No one was injured during the robbery.
Both suspects are described as black men between 5 feet 11 inches and 6 feet three inches tall. One had a shaved head and a thin moustache, and the other had a black cap.
Anyone with information about the robbery is asked to call the Police Department at (650) 780-7100.