Interior Ministry spokesman Mansour al-Turki said the attacker tried to enter the site early yesterday morning and was killed in an exchange of fire with the guards.
The two injured policemen were taken to the hospital with non-life-threatening injuries.
Al-Turki said a machinegun and live munition were found with the attacker, identified as Nawaf Menahi Shibib al-Utaibi.
He did not say whether al-Utaibi was wanted by the police or if he was believed to belong to the Islamic State group or other Islamic militant faction.