Second-half goals from Martin Caceres and veteran Alessandro Del Piero did the damage after the visitors had enjoyed the better of the first period.
Juve closed back to four points behind Milan, who beat Roma 2-1 on Saturday.
The defeat means Inter, who have just one win in their last 10 league encounters, are down in eighth and still three points behind a Europa League finish.
With one side desperate to keep hold of Milan's coat-tails and the other in need of a win to boost their European qualification chances, both sides went all out for the win.
Inter's Maicon played in Diego Milito on the edge of the box but his snap-shot was blocked by Gianluigi Buffon's feet.
Juve started to take control and Caceres found acres of space on the right to pick out Alessandro Matri but from close range he headed straight at Julio Cesar.
Claudio Marchisio almost picked out Simone Pepe and then Arturo Vidal played in Caceres to feed Matri, who seemed to have forgotten his shooting boots and blazed over.
The momentum swung back the visitors' way and Diego Forlan's near-post flick from Maicon's corner had Buffon scrambling the ball away.
Milito then took down a long ball and volleyed goalwards, Buffon parried but the Argentine forward thumped the rebound over from an angle.
Buffon made a couple of crucial stops to deny Joel Obi and Dejan Stankovic as Inter ended the half in the ascendancy.
Juve, however, started the second period better after Antonio Conte switched to a 3-5-2 formation and went in front just before the hour mark.
Marchisio let fly from outside the box and Cesar tipped the ball over.
But from Andrea Pirlo's resulting corner, Caceres was left all alone to head home from eight yards out.
Inter coach Claudio Ranieri threw on an extra striker in Giampaolo Pazzini but the visitors were struggling to create clear chances like they did in the first half.
And Juve finished the game just after Vucinic had been denied by Cesar when one-on-one, as Vidal slipped in substitute Del Piero to finish expertly into the bottom corner.
Juve could even have had more as Giorgio Chiellini was played in behind the defence but tried to square the ball to Fabio Quagliarella, whose close range shot was miraculously blocked by Maicon on the line.
Cesar also made a flying save to keep out a Chiellini header late on.
Lazio put daylight between themselves and their Champions League rivals as a Mobido Diakite goal two minutes from time gave them a 1-0 win over Cagliari.
The crucial strike cemented the Romans in third place, three points ahead of Napoli and Udinese in the race for the final Champions League qualification position.
It was a dramatic turnaround as Napoli had looked to be about to leapfrog Lazio when they led Catania 2-0 with the biancoceleste being held 0-0.
But Napoli conceded two quick goals from corners and Frenchman Diakite's late strike turned things on their head.
The centre-back headed home a Cristian Ledesma free-kick at the back post.
"It's a vital win which improves our Champions League hopes," said Giovanni Lopez, the assistant to coach Edy Reja, who spent the game in the stands serving a one-game ban.
As well as Napoli dropping points, Udinese drew 1-1 at Palermo on Saturday.
The result left Napoli coach Walter Mazzarri furious.
"I'm very angry, very," he said. "We thought the game was over. We were feeble at 2-0.
"They could have finished off the game but we didn't. Sometimes we're naive, we're children."
Juventus beat Inter to hang onto Milan's tail
Advertisement