The incident, the second attack in Jerusalem in four days, occurred near one of the gates to the flashpoint Al-Aqsa Mosque compound, the third-holiest site in Islam. Jews revere the site as the remnant of two ancient temples.
Israeli Internal Security Minister Omer Barlev described the gunman as a Hamas member from East Jerusalem. He used a submachine gun in the attack, Barlev said.
Hamas confirmed that the man identified by Israel as the assailant was its member. Britain on Friday banned Hamas, which controls the Gaza Strip and refuses permanent coexistence with Israel, as a terrorist group. That a move brought London's stance in line with the United States and the European Union.
The attack seriously wounded two civilians, one of whom died in hospital, a police spokesman said. Two police officers were lightly wounded.
Israeli Prime Minister Naftali Bennett ordered security beefed up around Jerusalem after Sunday's attack. "On a morning like this one can draw support from the (British) decision to delineate Hamas - including what is called its political wing - as a terrorist organisation," Bennett told his cabinet.
Israel captured the Old City and other parts of East Jerusalem in the 1967 Middle East war and annexed them in a move not recognised internationally.
Palestinians want East Jerusalem as the capital of a future state. Israel says the entire city is its eternal and indivisible capital.