That result shrunk Juve's lead to just one point with four games remaining, and two tough trips to Roma and Inter still to come.
As so often in Serie A, there were recriminations, centring on referee Daniele Orsato's decision to send off Inter midfielder Matias Vecino in the 15th minute at San Siro but to allow a reckless body-check by Juve midfielder Miralem Pjanic to go unpunished.
"It was a great evening of football between two teams who faced each other openly", said Allegri. "I think they came to encourage us, they did a good thing", revealed veteran defender Andrea Barzagli to Sky Italia.
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.
Juventus, who had coach Massimiliano Allegri sent off after the winning goal, thought they had scored a second in first-half stoppage time but the goal was revoked for offside after a VAR consultation.
A trademark late Juventus victor was in the air and it materialised when Paulo Dybala floated over a free kick and Higuain, who had earlier missed two good chances, powered in a header in the 89th minute.
Seb pips Lewis to pole
He had been down the order after making a mistake during his first attempt earlier in the final qualifying session. Both Red Bull and Ferrari seem to be ahead of us at the moment, so we've got some work to do.
The three points, which have to be considered a bonus, means they are now four ahead of second-placed Napoli, who play Fiorentina on Sunday.
In a weird finish, Allegri was sent to the stands for coming onto the pitch to celebrate.
Roma next face Liverpool in the Stadio Olimpico on Wednesday where they have to overturn a 5-2 first-leg deficit to advance to the final.
Edin Dzeko scored in either half with Patrik Schick and Stephan El Shaarawy also on target as Roma overran the side from Verona despite being a man down after Juan Jesus saw red 10 minutes into the second half.
Chievo are two points clear of the three-team drop zone.
Monaco's stalemate leaves it winless in three matches, while Marseille visits Angers Sunday as the two sides fight it out with Lyon for two Champions League spots behind champions Paris Saint-Germain. "Us with the voices, you with the heart, let's win it!", read a banner displayed by the Drughi Ultras group.