The military said aerial defence systems intercepted the rocket, which activated warning sirens in the southern coastal city of Ashkelon. There were no reports of casualties.
"In response to the firing of a rocket fired in the Ashkelon area, workshops for the production of weapons were attacked at a military post of the Hamas terrorist organisation. In addition, three Hamas military positions in the Gaza Strip were attacked," the Israeli military said on its official Twitter account.
There was no claim of responsibility for the rocket attack, but Israel holds Hamas, which has ruled Gaza since 2007, responsible for all attacks by militant groups in the territory.
The early morning exchange shattered nearly two months of relative calm between Israel and Gaza, in contrast to soaring tensions in the occupied West Bank over Israeli military raids on suspected militants.
The rocket launch came a day after Israeli troops killed three Palestinians and wounded eight others during an operation in the northern West Bank town of Jenin.
Also on Friday, an Israeli observation balloon crashed in the Gaza Strip. The Israeli military said it was investigating the incident.