Arturo Vidal's goal after 19 seconds served only to inspire Inter, which turned the game around in the second half to move to within a point of Juve at the top of the table.
Diego Milito was on target twice for Andrea Stramaccioni's side before Rodrigo Palacio sealed Inter's seventh win in a row in the last minute.
Juve needed just 19 seconds to go ahead against the Nerazzurri, although, like at Catania a fortnight ago, questions will be asked of an absent linesman's flag.
Kwadwo Asamoah was beyond the last Inter defender when he received the ball from Claudio Marchisio's touch, and it was his low cross that was met by Vidal at the far post to put the home team in front.
Juve tried to provide justification for their lead with Marchisio twice being denied by Samir Handanovic after delightful passes from Andrea Pirlo picked him out inside the penalty area.
The linesman's flag was raised at the other end of the field to rule out Palacio's headed goal after he met Esteban Cambiasso's quickly taken free kick in the 12th minute.
Antonio Cassano then curled a shot just inches wide of the post as Inter pushed for an equaliser, but it was the home team that almost grabbed a second before the break when Vidal pounced on a loose ball on the edge of the area, but his low shot was saved by Handanovic.
Inter came out fighting at the start of the second half with Palacio shooting into the side-netting from a tight angle, having rounded Gianluigi Buffon.
A well-worked free kick caught Juve out in the 59th minute with Marchisio resorting to tugging the shirt of Milito to prevent him from getting in a shot, but by doing so he gave away a penalty.
Milito stepped up to the spot to bring Inter level with a shot just beyond the reach of Buffon.
Inter took the lead in the 75th minute when substitute Fredy Guarin's shot was parried by Buffon to Milito, who beat the despairing lunge of Leonardo Bonucci to score his and Inter's second.
The Bianconeri sent everybody forward in search of an equalizer, but Nicklas Bendtnercurled a shot from the goal line beyond the far post of an open goal.
Palacio then finished Juve off, completing a swift counterattack after Juve committed too many men forward to end Juve's unbeaten run.
It was also a good night for Inter's city rivals AC Milan, which romped to a 5-1 win over Chievo at the San Siro.
Urby Emanuelson opened the scoring in the 16th minute, though the lead lasted only two minutes before Sergio Pellissier leveled.
Riccardo Montolivo and Bojan Krkic gave Milan a comfortable halftime lead before top goalscorer Stephan El Shaarawy got his customary goal in the 75th minute.
Giampaolo Pazzini added a fifth to wrap up victory with the last kick of the game.
"I think Milan is back," club vice president Adriano Galliani said. "I just spoke with the president (Silvio Berlusconi) and we both said the same thing, 'We seemed like Milan tonight.' He really liked Bojan and he told me to compliment the coach.
"We're a bit calmer now with the seven points from the last three matches, which have given us a bit of a jump. We've got a squad that can't not finish in the top places."