Juventus dominated the match in the beginning as Sebastian Giovinco's early penalty put them ahead before Sampdoria's Gaetano Berardi saw red for two first-half bookings.
But the numerical advantage did little to help the hosts, as Mauro Icardi levelled the score.
Icardi completed his brace with what proved to be the winner. Juventus now lead the second-placed Lazio by just five points ahead of a daunting trip to Parma.
Roma were thrashed by Napoli 1-4 in a one-sided game while Udinese scored three goals in the second half to beat 10-man Inter 3-0.