The workers mobbed Haniya’s motorcade outside parliament on Monday. Shots were fired to clear a path for the prime minister.
Haniya was forced to cancel a speech to parliament on the economic situation in the occupied West Bank and in the Gaza Strip.
An open-ended strike by government employees started on September 2.
Monday’s parliamentary session was suspended and members of President Mahmoud Abbas's Fatah faction left the chamber to join the protesters. Workers chanted "Haniya, where are the salaries?" and "Haniya go home".
Some protesters jumped onto Haniya's car.
The prime minister's bodyguards and members of a Hamas-led police force fired shots into the air to force them back. One woman was slightly hurt.
A Washington-led aid embargo has prevented Haniya's Hamas government from paying salaries to 165,000 workers since the Islamic militant group took power in March.
The workers' unions are dominated by Fatah, which was defeated by Hamas in parliamentary elections in January.
Fatah parliamentarians accused Haniya's bodyguards and the policemen of using excessive force.
Schools, clinics shut down
"The employees have a right to demonstrate," said Azam al-Ahmad, head of the Fatah faction in parliament.
"The employees have a right to demonstrate"
Azam al-Ahmad, head of Fatah faction in parliament
He accused Haniya's bodyguards of "attacking lawmakers and in protest we have decided to boycott this session and suspend it".
The strike by workers has shut down hundreds of schools and health clinics across the West Bank and in parts of the Gaza Strip.
Abbas and Haniya agreed last week to form a coalition government, in an attempt to ease the aid embargo.
The president's aides say that decision has been put on hold because Hamas reneged on the terms of the deal.
An opinion poll indicated on Monday that 54 per cent of Palestinians were not satisfied with the overall performance of the Hamas-led government; but they do not want Hamas to recognise Israel in order to ease the aid embargo.
Sixty-nine per cent of those surveyed said they were not satisfied with the government's performance on economic issues, according to the Palestinian Centre for Policy and Survey Research poll.
Sixty-six per cent of those surveyed said they did not think Hamas should accept the demands of Western powers to recognise Israel. Only 30 per cent said it should.
Only a quarter of those surveyed said they supported the formation of a national unity government under the leadership of Hamas.
The largest percentage support a national unity government in which Fatah and Hamas have equal power.