The hilltop compound in Jerusalem’s Old City is a frequent flashpoint and its fate is a core issue at the heart of the Israeli-Palestinian conflict.
Palestinian security officials however said he was shot dead by Israeli troops.
Police did not immediately explain the circumstances of the attack.
The festivities included the launching of fireworks and the waving of flags in the streets, Ofir Gendelman, a spokesperson for Israeli Prime Minister Benjamin Netanyahu said.
The latest attack took place just after the end of the Jewish Sabbath close to Lion’s Gate in the Old City.
Police have reportedly imposed restrictions on access of Palestinians to the Old City of Jerusalem, a walled area with key religious sites important for Muslims, Jews and Christians, as the attack became the second in several hours.
The Israeli military says it has dismissed an officer from his duties after soldiers were caught on camera assaulting a pair of Agence France-Presse journalists in the West Bank. Though not on the ranges of earlier Palestinian uprisings or “Intifadas”, it has raised Israeli fears of a higher escalation.
Media reports said three of the victims were members of the same ultra-Orthodox family on their way to pray at the Western Wall.
Police spokesman Micky Rosenfeld said it appeared the child had been shot.
Police identified the attacker as Mohamed Shafik Halabi, 19, who lived near Ramallah. The movement Hamas, in power in the Gaza Strip, praised the attack as “a heroic act of resistance”.
Israel captured the eastern part of Jerusalem, where the site is located, along with the West Bank in the 1967 war, territory claimed by the Palestinians for their future state. A shooting on an Israeli auto in the West Bank on October 1 left the driver and his wife dead and their four children slightly injured.
Erdogan demanded that the worldwide community must exert pressure on Israel to accept the establishment of an independent Palestinian state based on pre-1967 borders with east Jerusalem as its capital.
In his address to the United Nations chamber on Thursday, Mr Netanyahu called on Mr Abbas to “stop spreading lies” about Israel and return to peace talks. The army stated vital progress towards catching the assailants has been made.
Last month, during the Jewish new year holiday of Rosh Hashanah, Israeli police and Muslim activists clashed on the site, and Arab youth barricaded themselves inside the al-Aqsa mosque to protest Jewish visits to the area.