Domenico Berardi’s penalty put the hosts in front midway through the first half, but Dzeko made an immediate impact by heading in the leveller with his first touch in the 58th minute.
The Bosnian, who became the joint-top scorer in Serie A alongside Lazio's Ciro Immobile with six goals, was then brought down by goalkeeper Andrea Consigli in the box and Lautaro Martinez dispatched the resulting spot-kick.
"I have scored a lot of goals but I do not remember if I have ever scored with the first touch, there is a first time for everything," Dzeko said after the match.
"I know how much I still have to offer, Inter know that too and decided to sign me to score goals."
Inter rose to second place on 17 points, one point behind leaders Napoli, who travel to Fiorentina on Sunday. Sassuolo are 13th with seven points.
Simone Inzaghi’s side needed a response after back-to-back draws against Atalanta in Serie A and Shakhtar Donetsk in the Champions League, but they went behind after 22 minutes at the Mapei Stadium.
Jeremie Boga dribbled into the box and was tripped by Milan Skriniar, allowing Berardi the chance to dispatch the opener from the penalty spot.
Chances flew in at both ends, with Consigli beating away a Nicolo Barella drive and Samir Handanovic tipping over a dipping Berardi volley.
On the brink of halftime, Sassuolo's Gregoire Defrel latched onto a loose back pass to go clean through on goal and collided with Handanovic after the goalkeeper had rushed out of his box, but the referee ignored the home side’s appeals for a red card.
The incident caused controversy after the game, with Inter coach Inzaghi saying it was the correct decision, while his Sassuolo counterpart Alessio Dionisi disagreed.
"Referees can make mistakes and we must accept the verdict, even if it is not always good. We deserved more," Dionisi told Sky Italia.
"We would have won if we had returned to the pitch in the second half with an extra man."
It was just as well for Inter that Handanovic remained on the pitch, as the Slovenian saved them twice early in the second half, blocking a Rogerio shot with his legs before getting a hand to a powerful Boga shot.
Inzaghi rang the changes by bringing on four new players at once and was immediately rewarded when one of those replacements, Dzeko, headed in an Ivan Perisic cross a minute later.
The Bosnian is the first player to score at least six goals in his first seven Serie A games in a debut season for Inter since Brazilian great Ronaldo in the 1997-98 campaign.
Dzeko then raced after a through ball and was barged over by Consigli for Martinez's decisive spot-kick in the 78th minute.
His night almost got even better when he tapped in a Barella cross, but the striker was flagged for offside.
"I think that after playing every three days the changes needed to be done, there were guys who came off who did not deserve to come off, but I had to give a boost to the team because there were a lot of tired players," Inzaghi said.
Inter's victory meant they scored at least two goals for a 12th consecutive league match, overtaking their previous longest run of 11 games from 1943.