The four were killed in the demolition of a smuggling tunnel Wednesday, al-Jazeera and Voice of America reported.
"This is a terrible crime committed by Egyptian security against simple Palestinian workers who were trying to earn their daily bread," Fawzi Barhoum, the Hamas spokesman, said.
Egyptian authorities occasionally use explosives and gas in the tunnels, al-Jeera said.
Security officials in Egypt denied a Hamas accusation that poison gas was used, the BBC said.
Egypt has been building an underground steel wall to block the tunnels since December, but Wednesday's incident was the first alleged use of lethal gas, Voice of America reported.
Hamas said Egypt collaborates with the Israeli blockade of Gaza but Egypt fears weapons smuggling and terrorists who threaten the pro-Western Egyptian government, Voice of America said.