The often-controversial Italy international has been a goalscoring revelation since swapping Manchester City for Milan in January, helping to ease the burden on Stephen El Shaarawy.
Sunday's goal, which came with just six minutes left, was his 11th since arriving at the club, although typically it was followed by a booking for dissent.
Milan are now four points clear of fourth-placed Fiorentina in third - the final Champions League spot - and with three games left, they will have to go some to let it slip.
At the other end, Torino are four points from danger and should be okay.
They certainly did not start like a team with relegation worries, with Alessio Cerci beating the offside trap but was denied by Christian Abbiati.
The away team continued to pour forward and Abbiati was called upon again, keeping out Paul Barreto with a brilliant one-handed stop.
Milan eventually woke up and El Shaarawy went close in amongst a scuffle from a corner, while Kevin-Prince Boateng should have done better with a loose ball.
The former Tottenham man then skipped in from the right and worked Jean Francois Gillet, and the pressure continued after the break as Sulley Muntari rattled a shot over.
Balotelli then wildly drove a Boateng cross away from goal as frustrations grew and with AC intent on attacking, Abbiati's fine stop from Barreto reminded them it was imperative not to lose.
Robinho tried to liven Milan up with a shot which Gillet handled, but Balotelli eventually made the difference when Kevin Constant's free-kick was nodded into his path by Phillipe Mexes, leaving him with a simple finish.
His celebrations brought about a caution, but it mattered little as he sent the home fans home thinking of a Champions League campaign.