Another 20 people were wounded in the fighting, Muawiya Abu Hassanein, director of emergency services in Gaza, said.
He said that Palestinian ambulances were prevented from reaching the scene of the incident to attend to more casualties.
An Israeli military spokeswoman confirmed that a raid was undertaken, describing it as "a routine operation against terrorist threats".
Israel this week stepped up ground and air operations against Islamic Jihad, which has spearheaded cross-border rocket attacks from Gaza.
Hours after the Israel raid near Maghazi, three rockets were fired into the Israeli border town of Sderot, one of which landed 40m from a school, Israeli police said.
Twelve children were treated for shock, the police said.
Hamas said it fired 21 mortar bombs at Israeli border posts. There were no reports of casualties from those attacks.