Title contenders Napoli had heaped the pressure on Juventus after a 4-0 rout of Livorno which moved Rafael Benitez's men up to second place in the table.
But after being stunned by Sulley Muntari's first-minute opener in Turin, Antonio Conte's men were soon level thanks to Andrea Pirlo's sublime free kick.
In a pulsating encounter played in torrential rain, Juve upped the pace after the interval when Sebastian Giovinco gave the hosts a 2-1 lead and Giorgio Chiellini added a third following the expulsion of Milan defender Phillip Mexes.
The shine was taken off a convincing win, however, when Muntari struck his second of the match and Juve escaped dropping two precious points when Cristian Zapata saw a bullet header go just over at the death.
It was a combative and at times bad tempered affair and after Mexes was red-carded for manhandling Chiellini in the box at a corner, the Italy defender called for the Frenchman to be harshly sanctioned.
"This kind of thing needs a heavy sanction," said the Italy defender.
"Some people just won't learn. When you're tough and determined, that's fair enough because at the end of the day you get up from a hard tackle and shake hands. But that is just not football."
With Roma comfortably on top with 21 points from seven games, Napoli and Juventus are both two points adrift in second and third respectively Inter in fourth.
Roma host Napoli in two weeks' time following a break for World Cup qualifiers, and Benitez was clearly buoyant with his side's performance following a 2-0 Champions League defeat to Arsenal last week.
"It was important to get back to winning ways," said the Spaniard.
"Roma have won seven out of seven but we've won six and drawn one, so we're on a level playing field."
Inter, stunned 3-0 at home by Roma on Saturday, are seven points off the lead, five shy of Napoli and Juventus and only one ahead of Verona, who won 4-1 win away to struggling Bologna.
Francesco Totti scored a double in Roma's rout, and while he was careful not to make mention of the word scudetto, he admitted: "This squad can go far and although the season is long and we will come up against teams that are stronger than us we have to fight for a Champions League place.
"That is our objective."
Mazzarri, meanwhile, was philosophical after a defeat which he put down to Inter's failure to take their chances.
"Sometimes things don't your way," said Mazzarri, who led Napoli to a second-place finish last season.
"I'm trying to improve the team and instill belief and I saw signs of that tonight. We weren't inferior to Roma, they just made the most of the chances they had."
Verona's suprise presence among the top five was partly down to the goalless draw between Lazio and Fiorentina at the Olympic Stadium, which left them seventh and sixth respectively.
Injury-ravaged Milan, who are still without playmaker Kaka and suspended striker Mario Balotelli, are now languishing in 12th place with a 13-point deficit to Roma.
Milan coach Massimiliano Allegri said he did not agree with Mexes' sending-off, and tried to limit the damage by telling Sky Sport Italia: "It wasn't a punch, that is sure.
"What we have to do now is go game by game to try and get ourselves back up the table, and hopefully have some players back (from injury) soon."
Photos: 'Dangal' girls Sanya Malhotra, Fatima Sana Shaikh's dinner outing
Photos: Salman Khan, Daisy Shah spotted at the Mumbai airport
Photos: Rakhi Sawant to play Honeypreet in Ram Rahim biopic
Photos: Arvind Kejriwal asks Kamal Haasan to join politics
Photos: TV actress who played goddesses on the small screen