There were no casualties in the attack, which caused some damage to the Three Pyramids Hotel, and the gunmen were arrested soon afterwards, they added.
The driver of the bus said that the tourists included Israeli Arabs.
Egypt has been battling a jihadist insurgency since the military overthrew President Mohammed Morsi in July 2013.
Militants, largely based in the Sinai Peninsula, have killed hundreds of security personnel and civilians, set off bombs in the capital and attacked Western targets.
In June, gunmen shot dead two policemen a few hundred metres from the pyramids, Egypt’s most visible tourist attraction.
An affiliate of the jihadist group Islamic State (IS) has also claimed it planted a bomb on a Russian passenger plane that crashed in Sinai in October, killing all 224 people on board. However, Egypt says it has found no evidence of terrorism.
By Dike Onwuamaeze