Roma had dropped to third after AC Milan stunned champions Juventus 1-0 on Saturday when teenaged midfielder Manuel Locatelli beat Gianluigi Buffon with a second-half scorcher.
But yesterday Luciano Spalletti's men had no problem joining fellow scudetto hopefuls in capitalising on Juve's rare slip, the Giallorossi wowing fans with a well-oiled attacking performance that kept them firmly in the title chase.
"You have to be prepared to seize the day, climb on board and secure the right result as we did tonight," said Spalletti.
Juventus remain top but their second defeat of the campaign, after a 2-1 reverse to Inter Milan last month, has reduced their advantage to two points on Roma and AC Milan.
Fellow title hopefuls Napoli are back in the hunt after a cagey 2-1 win at basement side Crotone yesterday moved the 2016 runners-up to fourth, at only four points adrift.
A lightning start at the Stadio Olimpico saw Stephan El Shaarawy, who hit a brace in a 3-3 Europa League draw against Austria Vienna in midweek, come close with a smashing right-foot volley from Dzeko's pass.
Palermo came close to a quick equaliser when Alessandro Diamanti's free kick, following a foul by Juan Jesus on the edge of the area, came off the far top corner.
Diamanti's 25-yard drive forced Roma 'keeper Wojciech
Szczesny into action soon after, and the Pole was down quickly to smother Sinisa Andelkovic's close range header moments later.
Spalletti had replaced Jesus with Alessandro Florenzi at half-time, and on 68 minutes Dzeko pounced on the Italy midfielder's delivery to beat Posavec with an unstoppable daisycutter.
But a Roma counter two minutes later saw El Shaarawy claim his third goal in two games when he collected Salah's unselfish pass to beat Posavec on 82 minutes.
If Juventus fail in their attempt to secure a record sixth consecutive title later this season, Milan' first win over the Old Lady in 10 attempts will be regarded as a turning point.
Juve showed throughout a stirring encounter why they are still the team to beat in Italy's top flight.
But failure to find a way past Milan's teenaged goalkeeping sensation Gianluigi Donnarumma proved costly, and the cancellation of a perfectly valid goal from Miralem Pjanic, has given hope to their title rivals.
At the other end, Juve goalkeeper Gianluigi Buffon was finally beaten by a superb drive from 18-year-old Locatelli -- although even he didn't know how.
"I really don't know how I did it, but I scored against the greatest goalkeeper in the world," said Locatelli.
Milan's fortunes contrasted with those of city rivals Inter, whose shock 2-1 defeat at Atalanta was the first time they had conceded three consecutive league defeats since 2013.
Coach Frank De Boer has reportedly been summoned by Inter's Chinese owners Suning, but ahead of Wednesday's outing against Torino the Dutchman says it's business as usual.
