Israeli aircraft first fired a non-explosive rocket at the building, a sign to residents to get out, before attacking it on Saturday. Seventeen people were wounded in the strike on the structure, which Israel said had housed a Hamas command centre.
"I call on the inhabitants of Gaza to evacuate immediately from every site from which Hamas is carrying out terrorist activity," Netanyahu said. "Every one of these places is a target,"
With no end in sight to fighting now in its seventh week, Netanyahu's tough talk could indicate a move towards bolder strikes in densely populated neighbourhoods.
Thousands of homes have been destroyed or damaged in the conflict. Nearly 500,000 people have been displaced in the territory of 1.8 million where Palestinians, citing Israeli attacks that have hit schools and mosques, say no place is safe.
Israel has said Hamas bears responsibility for civilian casualties because it operates among non-combatants. The group, it said, uses schools and mosques to store weapons and as launching sites for rocket attacks.
Palestinian health officials say 2,108 people, most of them civilians and more than 400 of them children, have been killed in the Gaza Strip since July 8, when Israel launched an offensive with the declared aim of ending Palestinian rocket fire into its territory.
Sixty-four Israeli soldiers and four civilians in Israel have been killed.