An Israeli army spokeswoman said she was checking whether the Israeli army was involved in the explosion.
"We are not aware of this incident," the spokeswoman said.
Nour Odeh, Al Jazeera's correspondent in Gaza, reported: "We can now confirm there are at least two deaths and three other injuries". She said the explosion was "followed by gun shots".
Hamas's Executive Force was investigating the blast but had not yet identified those killed, a spokesman for the group said.
Israel regularly launches attacks against Palestinian fighters in the Gaza Strip in an attempt to stop rockets being fired into nearby towns, but tensions between Hamas and the rival Fatah faction have also been running high in recent months.
Hamas seized full control of the territory after heavy fighting with security forces loyal to Mahmoud Abbas, the Palestinian president, in June.
Earlier on Tuesday, Israel sent 29 prisoners home to the Gaza Strip as part of an attempt to bolster Abbas ahead of a US-sponsored conference on Palestinian statehood.