The win left Chelsea level on points with the league leaders with two games left for both clubs. United's vastly superior goal difference means they will still be champions if they beat West Ham at home next Saturday and win at Wigan on May 11. But Chelsea, who face Newcastle away on May 5 and entertain Bolton on the final day of the season, have put themselves in a position to exploit any slip-ups by the champions.
Chelsea's domination of a first half in which Joe Cole saw a 21st-minute shot bounce back off the post looked like going unrewarded until Ballack popped up in the area in stoppage time.
Having peeled off his marker Darren Fletcher, the Germany captain directed Didier Drogba's cross back across Edwin van der Sar and into the corner of the net.
At that stage, Chelsea looked capable of going on to win comfortably. But within 12 minutes of the restart United were level, courtesy of a horrendous error by Ricardo Carvalho, whose misjudged pass presented Rooney with a clear run on goal.
The England star cut across John Terry before beating Petr Cech from the edge of the area with a low drive that went in off the post.
Chelsea seemed to be coming apart at the seams as they saw the title slipping away highlighted by a bizarre altercation between Ballack and Drogba over who should take a freekick as the match neared its end - the Ivory Coast international eventually took it and forced a good save from van der Sar, though he carried on the row after that and even had words with assistant coach Steve Clarke.
A draw then looked the most likely result until, with four minutes left, Michael Essien's cross from the right struck Michael Carrick on the arm,prompting the referee to point to the spot.