Juve found themselves in trouble at half-time after Jose Callejon capped off a well-worked Napoli move to put the visitors ahead in the 36th minute.
But the holders rallied after the break and ultimately earned a two-goal advantage thanks to two Paul Dybala penalties – the second controversially awarded – sandwiched either side of a Higuain strike.
And the former Napoli star highlighted the importance of Allegri's words of wisdom at the interval.
"It was a very complicated game against an impressive Napoli," Higuain told Rai Sport.
"In the first half we struggled to emerge with the ball at our feet. During half-time the coach told us to not lose our patience, as we could turn it around. And that's what we did.
"This is the strength of Juventus; we got our heads down and didn't lose our patience. We bring home an important victory, now we are going to Naples with a positive result."