Roma had dropped to third in Serie A at 11 points behind leaders Juventus before their 3-1 win over Sassuolo.
Roma had dropped to third in Serie A at 11 points behind leaders Juventus after the Turin giants took another step towards a record six consecutive title with a hard-fought, 1-0 win at Sampdoria.
But Luciano Spalletti's men, still hurting from Europa League elimination by Lyon in midweek, overcame a shaky start at the Stadio Olimpico to see Leandro Paredes and Mohamed Salah score in the opening half before Dzeko came off the bench to secure the points with his 21st goal of the campaign on 68 minutes.
Sassuolo started brightly and after giving Wojciech Szczesny a scare in the opening exchanges when he fired inches over, Frenchman Gregoire Defrel was left unmarked to beat the on-loan Arsenal goalkeeper from 12 yards on nine minutes.
It woke Roma from their slumber, and, having stung Andrea Consigli's gloves in the second minute, Salah's smart cut-back for Paredes saw the midfielder's superb first-time strike from outside the area beat the 'keeper on 16 minutes.
Emerson Palmieri's snap shot from the edge of the area also beat Consigli but pinged off the crossbar, while at the other end Szczesny blocked Matteo Politano's effort with his legs after a through ball from Defrel.
Great reflexes from Szczesny saw the Pole deny both Defrel then Politano before Salah gave Roma a crucial 2-1 half-time lead, the Egyptian poking a loose ball past Consigli from close range after he spilled a shot by Stephan El Shaarawy.
When Dzeko replaced Bruno Peres on the hour the big Bosnian made an immediate impact, firing past Consigli from inside the area to seal the points.
Dzeko is now one goal behind Serie A leader Andrea Belotti, who has 22.