Two other people have been wounded in the assault, in the remote community of Ad Dair, next to the border with Yemen.
The attacker has been arrested, an official said.
No motive has been given for the attack, and authorities say they are treating it as a criminal act.
The suspect has not been identified but the AFP news agency, quoting Al-Ekhbariya state TV, reported that the man was not an employee but had some business at the ministry.
Earlier reports suggested the attacker was a teacher.
Criminal mass shootings are rare in Saudi Arabia but the country has faced recent attacks by ISIS.
Saudi Arabia has led an air campaign against Shia Houthi rebels in Yemen and violence in the border region has been frequent in recent months.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…