Defending champions Juventus looked set to open the door for Napoli - who won 1-0 in Turin last weekend to breathe new life into the title battle - after Inter came from behind at San Siro on Saturday.
Matias Vecino's 18th-minute red card, after Douglas Costa had rifled Juve in front, appeared likely to ensure Massimiliano Allegri's men would comfortably claim three points.
However, Juve collapsed after the break, Mauro Icardi heading Inter level before an own goal from Andrea Barzagli put the hosts in front.
Much more drama was still to come, though, with Juan Cuadrado's cross deflecting in off Milan Skiriniar in the 87th minute prior to remarkable scenes in the closing stages.
Higuain had been guilty of missing a fantastic chance with the score at 1-1, but the former Napoli striker significantly dented the Partenopei's title hopes with an 89th-minute header to spark wild celebrations and ensure the Scudetto, somewhat improbably, remains in Juve's hands.
Napoli must now respond when they head to Fiorentina on Sunday, while Inter remain outside the Champions League places and could yet lose further ground to fourth-placed Lazio.
When Juventus took a 13th-minute lead, a Cuadrado cross controlled and lashed in on the volley by Douglas Costa at the back post, there were few signs of the drama that was to come.
That goal survived a VAR review for a possible handball in the box by Blaise Matuidi and the technology was used again in Juve's favour moments later to decide the fate of Vecino.
Referee Daniele Orsato originally decided an apparent stamp on Mandzukic was only worthy of a yellow card, but Vecino was dismissed after the official reviewed the video replay.
Inter responded well to being reduced to 10 men, but Juve were denied a second goal in first-half stoppage time, Matuidi ruled by VAR to be offside when he lashed in from close range.
Allegri's side have been troubled by set-pieces all season, Kalidou Koulibaly's 90th-minute header winning the game for Napoli last weekend, and Icardi ensured 11 of the 22 league goals conceded by Juve this term have come from dead-ball situations.
Juve made a sloppy start to the second period and when Cancelo floated a delightful free-kick into the box, Icardi found space to head home his eighth goal against the Bianconeri.
Inter felt Miralem Pjanic should have been sent off when the already booked midfielder barged Rafinha, but referee Orsato instead took Danilo D'Ambrosio's name for dissent.
Higuain blazed wide after rounding Samir Handanovic and the 10 men promptly took the lead in the 65th minute. Perisic won possession deep in Juve territory and when the Croatia international sent a low ball across goal, Barzagli could only turn it into his own net.
Allegri turned to Paulo Dybala for inspiration and the forward forced a sensational one-handed save from Handanovic with a dipping free-kick.
The Juve coach said after his side lost to Napoli that Maurizio Sarri's team should be considered favourites and as Inter led with three minutes left the Partenopei looked set to move into pole position.
Yet out of nowhere Juve drew level, Cuadrado scampering clear down the right and pulling back a cross that beat the helpless Handanovic thanks to a big deflection off Skriniar.
Within two minutes Juve had scored the goal that could eventually secure a seventh straight Scudetto, Higuain stooping to nod in Dybala's cross and spark delirious scenes of jubilation.
Allegri appeared to be dismissed in the aftermath after running on to the pitch to tell his side to calm their celebrations, but victory ensures Juventus remain in control of their destiny.