Palestinian militant group Hamas fired dozens of rockets towards Jerusalem and southern Israel on Monday night.
Israel carried out air strikes in Gaza throughout the evening and into the early hours of Tuesday morning.
Twenty Palestinians including nine children died in the unrest, while 95 others were wounded, the Gaza Health Ministry said.
At least seven members of one family, including three children, died in an explosion in northern Gaza.
The offensive came after weeks of confrontation between Israeli police and Palestinian protesters.
Israeli Prime Minister Benjamin Netanyahu accused Hamas of crossing a “red line” with its rocket attacks on Jerusalem and promised a tough response.
“We will not tolerate an attack on our territory, in our capital, on our citizens and soldiers. Whoever attacks us will pay a heavy price,” Mr Netanyahu said.
Mr Netanyahu warned the fighting could “continue for a while”.
The rocket fire began at 6pm, the deadline Hamas had issued for Israelis to clear their forces from Sheikh Jarrah and release detained Palestinians.
The Israeli army said at least 50 rockets were fired, mostly at southern border cities. Its Iron Dome anti-missile defence system intercepted a number of the rockets.
The Israeli army said it launched a series of retaliatory attacks against Hamas militants in Gaza.
Abu Obeida, the spokesman for Hamas' military wing, said the attack on Jerusalem was a response to Israeli "crimes and aggression" in the city.
He threatened more attacks if Israeli forces re-enter the sacred Al Aqsa Mosque compound or carry out planned evictions of Palestinian families from the East Jerusalem neighbourhood.
The militant group Palestinian Islamic Jihad also claimed to have fired more than 30 rockets into Israel, shortly after several towns were put on "Red Alert" by the Israeli military.
In Washington, White House Press Secretary Jen Psaki said the administration, including President Joe Biden, was monitoring the violence.
“We have serious concerns about the situation, including violent confrontations that we’ve seen over the last few days,” she told reporters. The US Embassy in Israel said the rocket fire was “unacceptable”.
The Palestinian Red Cross escalated its emergency level and preparedness status on Monday evening due to the rising tension.
"Ambulance teams, advanced medical units and volunteers have increased their readiness," a statement said.
The Red Cross has treated 654 individuals in East Jerusalem since May 7, of which 338 were transferred to Jerusalem hospitals. Two paramedics were injured.
As sirens sounded ahead of the incoming rocket fire, Israel's legislative assembly, the Knesset, was evacuated, a moment captured on the parliament's TV feed.
Earlier in the day, Israeli police fired tear gas, stun grenades and rubber bullets during clashes with stone-throwing Palestinians at the Al Aqsa Mosque compound.
More than a dozen tear gas canisters and stun grenades landed in the mosque as police and protesters faced off inside the walled compound that surrounds it, reported Associated Press. Smoke rose in front of the mosque and the golden-domed shrine on the site, and rocks littered the nearby plaza. Inside one area of the compound, shoes and debris lay scattered over ornate carpets.