Hamdallah was not injured in the explosion, which occurred shortly after his convoy entered the territory run by freedom movement Hamas, a security source in the convoy said.
Palestinian intelligence chief Majid Faraj was part of the convoy but was not hurt either, the security source said.
A statement on official Palestinian media said president Mahmud Abbas considered it a "cowardly targeting" of Hamdallah's convoy and held his rivals Hamas responsible.
Israeli troops kill Palestinian in West Bank clashes
There was no immediate claim of responsibility. Radicals opposed to Hamas also operate within the Gaza Strip and have regularly been behind unrest there.
The Hamas interior ministry confirmed there had been an explosion and said security forces were investigating the incident.
It said it would not derail Hamdallah's visit, which comes as reconciliation agreement between Hamas and Abbas's Fatah party falters.
The two major Palestinian factions signed a reconciliation agreement in October that was supposed to see the Islamists hand over power, but it has all but collapsed.
Hamdallah appeared on television shortly after the explosion as he opened a plant in the territory.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ