Another Yemeni official said no one was hurt in the attack.
"No one seems to have been hurt. It was a checkpoint leading to the embassy, and not close to the building," the official said.
The US embassy had earlier urged Americans to be cautious in the Arab country that has been the scene of "terror" attacks on Western interests.
"The US embassy has received a threat against the embassy compound regarding a possible attack which could take place in the foreseeable future," a statement from the US mission said.
"US citizens in Yemen are advised to exercise caution and take prudent security measures in all areas frequented by Westerners."
There has been a series of attacks in Yemen on security services and oil installations in recent months.
On September 17, an attack claimed by al-Qaeda targeted the US embassy, leaving 19 people dead.
Yemen is the ancestral homeland of Osama bin Laden, al-Qaeda's leader.
In October 2000, a bombing attack on the destroyer USS Cole in the southern port of Aden killed 17 American sailors.