The Israeli military said 15 targets were hit, including a weapons manufacturing facility, a naval compound used by militants and tunnels belonging to Hamas, the dominant armed force in Gaza.
There were no immediate reports of casualties.
Hours earlier, bodyguards rushed Netanyahu to shelter in the southern Israeli city of Ashdod when the sirens sounded during a Tuesday evening rally, a week ahead of a general election.
Netanyahu was unhurt and several minutes later he continued his speech, which was broadcast live on social media by his right-wing Likud party.
However, the spectacle of the prime minister being forced off the podium added fuel to accusations by political opponents that he has not done enough to halt the frequent cross-border rocket strikes against southern Israel.
The Israeli military said two rockets had been fired from the Gaza Strip towards Ashdod and another port city, Ashkelon, just to the south, and were intercepted by the Iron Dome anti-missile system.
It said Wednesday’s strikes in Gaza came in response to the rocket launchings.