The prime minister was unhurt in the blast and continued with some of his official duties, but six of his guards were slightly wounded.
The attack happened in northern Gaza, just a few hundred meters from the Erez crossing to Israel.
The convoy, which had just crossed into Gaza, included the head of the Palestinian intelligence service Majid Faraj.
Three cars were damaged in the explosion and the six injured guards were taken to the West Bank where they were treated in hospital in Ramallah.
Al-Hamdallah and Faraj continued on to the opening ceremony of the internationally funded sewage treatment plant but left Gaza soon after without meeting any Hamas leaders.
Hamas has been in control of Gaza since 2007, after seizing the territory in clashes with the rival Fatah faction, which controls the West Bank.
The two sides reached an Egyptian-brokered deal in October, which was supposed to see Hamas hand over powers to the Palestinian Authority.
But after giving up security oversight of the Gaza border crossings in November, the deal has faltered and Hamas maintains full control of the territory. Yesterday’s bombing is expected to further derail prospects of Palestinian unity, which many feel is essential for any progress in peace talks with Israel.
“What happened is a disgraceful act and will only increase our determination to serve the Gaza Strip,” Al-Hamadallah said at the opening ceremony of the wastewater plant.
The bombing “will only increase our resolve to continue our work in the service of the Gaza Strip and end the division, and we will continue to work with determination to complete our government projects,” he said.
Hamas condemned the attack, accusing “Israel and its agents” carrying it out.
“This crime is an integral part of the attempts to tamper with the security of the Gaza Strip and to strike any efforts to achieve unity and reconciliation,” the group said.
Hamas’s Interior Ministry in Gaza said it had opened an urgent investigation into the incident and arrested a number of suspects.
Major General Tawfiq Abu Naim, commander of the internal security forces in Gaza, said “There will be an investigation.
“I have had three inspection tours of the place to secure the road since yesterday. This incident serves only the occupation,” he added, referring to Israel.
Witnesses said the bomb was planted under an electricity pole on Gaza’s main north-south road. The device went off shortly after Hamdallah’s 20-vehicle convoy had entered through the crossing, AP reported.
“I could not see anything because smoke and dust filled the air. When the smoke cleared, the explosion was followed by heavy gunfire, apparently from police securing the convoy. When the dust cleared, I saw people running everywhere, and police were running around,” said a witness.
Two vehicles were badly damaged and could not continue. One had bloodstains on the door. At least two bodyguards were slightly wounded.