"I commend the personnel of the Tel Aviv-Yafo Municipality security patrol for their alertness and for engaging, thereby thwarting a much more serious attack," the premier said in a statement.
The gunman, identified as a 27-year-old Palestinian from the Israeli-occupied West Bank, was fatally shot by another officer and died in a hospital.
Netanyahu promised that Israeli security forces will settle the score with everyone who sought to attack Israelis. The Jewish state launched an unprecedented military operation at a refugee camp in the West Bank last month in a bid to rout Palestinian militancy.
On Saturday, tens of thousands of Israelis took to the streets of Tel Aviv for the 31st consecutive week of protests against the judicial overhaul that have roiled the country since the start of the year.
Israeli television put the attendance in Tel Aviv at over 100,000, almost half the number reported last weekend. Organizers said demonstrations were taking place at 150 locations across the country.
The rally near the government complex paralyzed traffic in the heart of Tel Aviv, a Sputnik correspondent reported. Crowds were seen waving national flags and shouting anti-government slogans.
Protests against the reform, which seeks to curb the top court’s powers and give the right-wing government more say in appointing judges, reignited in July after the parliament passed a bill that will limit the ability of judges to overturn government decisions that they deem unreasonable.