Police identified the shooter as a 42-year-old Palestinian from East Jerusalem, and Hamas later identified him as Fadi Abu Shkhaidem, a teacher at a nearby high school.
The attack also wounded two Israeli police officers and another civilian, Reuters reported.
The shooting occurred near one of the gates to the Al-Aqsa Mosque, a controversial holy site that the Jewish people know as the Temple Mount and Muslims call the Noble Sanctuary.
Israeli officials said the gunman killed Eliyahu Kay, 26, who had emigrated from South Africa and worked at the Western Wall. Hamas claimed Shkhaidem as one of its members, but did not claim credit for the attack.
Authorities have therefore not determined if the gunman acted alone or on orders from the group.
But Hamas praised the attack as a "heroic operation."
"Our people’s resistance will continue to be legitimate by all means and tools against the Zionist occupier until our desired goals are achieved and the occupation is expelled from our holy sites and all of our lands," spokesman Abdel Latif al-Qanou said.
The attack follows a statement by Britain that it will join the U.S. and European Union in condemning Hamas as a banned terrorist organization.
"On a morning like this one can draw support from the (British) decision to designate Hamas - including what is called its political wing - as a terrorist organisation," Israeli Prime Minister Naftali Bennett told his cabinet.
Dimiter Tzantchev, the EU ambassador-designate to Israel, condemned "this senseless attack against civilians. Violence is never the answer."
The Associated Press contributed to this report.