They said the attack on the camp in Gaza City on Wednesday also wounded three people, one of them a child who was in a critical condition.
The dead men were identified as members of the Popular Resistance Committees, a Palestinian resistance group.
An army spokesman said: “The IDF attacked a training camp for terrorists in Gaza. The site was used by terrorists making preparations for terror activities against Israeli targets.”
Witnesses said the air strike was directed at fighters in a small grove of citrus trees in the Tufah area of Gaza.
Fighters of the Islamic Jihad group wept over bodies at Shifa Hospital where they were taken.
The girl was brought to the hospital with the two men, but it was unclear how she was hit, police said.
Earlier on Wednesday, Israeli helicopters fired missiles at two houses in the West Bank refugee camp of Jenin, killing two Palestinians, witnesses and security officials said.
Witnesses said they saw two bodies being removed from the buildings.
Security officials said the two, Osama Attili and Mohammed Atik, were leaders of Islamic Jihad’s military wing.