The win takes the London club level on 81 points with United, but the Red Devils have a far superior goal difference with 53 to Chelsea's 37 with just two matches to play.
United host West Ham United next weekend and then play away at Wigan to finish the league season, while Chelsea travel to Newcastle and then host Bolton on the final day.
"We needed to win, and they were two great goals from Bally [Ballack]," John Terry, Chelsea captain, told Sky Sports.
|"We want to win this premiership and take it away from Man United."|
"We want to win this premiership and take it away from Man United.
"I think we showed people today we can match anyone on our day."
Ballack opened the scoring with a well-executed header in first half stoppage time, but Rooney had the equaliser in the 55th minute after a moment of madness from Blues defender Ricardo Carvalho.
Avram Grant, Chelsea manager, threw his attacking players on late in search of victory, with Carrick's hand-ball allowing Ballack to keep the title race alive.
Chelsea were without midfielder Frank Lampard who was mourning the death of his mother earlier in the week, while United started with attacking players Cristiano Ronaldo and Carlos Tevez on the bench.
"We did it for Frank [Lampard] and his family. It is a diffifult time for everyone, and it is a day for him today," said Ballack.
"It was a geat victory for the team, everyone played strong."
Mikel Essien had the first effort on target as early as the first minute when he sent a looping shot into the arms of United keeper Edwin van der Sar.
Nemanja Vidic, United central defender, was stretchered off in the 13th minute after stooping low to head the ball, only to be struck in the face by the knee of Didier Drogba who was making a fair challenge for the ball.
Owen Hargreaves replaced Vidic, and it was all Chelsea in the first half.
In the 25th minute Joe Cole showed some fancy footwork to drift past Rio Ferdinand and go one-on-one with Van der Sar, but the Dutch keeper was up to the task, diving low and putting his body on the line before Cole could get a shot away.
In the 33rd minute Ashley Cole floated a Chelsea free-kick into the box where John Terry met the cross with a powerful header that went over the bar.
There were four minutes of first half stoppage time due to Vidic's injury, and in the first sixty seconds of that period good work from Drogba resulted in a cross into the box from the right with Ballack ghosting in unmarked, executing a clinical header from six yards.
Ten minutes after the restart, Carvalho, playing his 100th Premier League match, hit a poor back-pass without looking, with the ball ending up at the feet of Rooney who had a free path to goal.
Terry attempted to get back in cover, but Rooney changed directions and wrong-footed keeper Petr Cech as he slotted the ball low into the bottom left corner of goal for the crucial equaliser.
Rooney was then substituted just after the hour mark with what appeared to be an abdominal injury, but United lost nothing in quality as Ronaldo came off the bench to replace him.
Then with five minutes remaining, Carrick's outstretched left arm resulted in a clear hand ball from Essien's cross from the right, and despite protestations from the United players Ballack kept his cool from the spot to complete his double.
Cristiano Ronaldo had a shot cleared off the line by Ashley Cole with one minute left, before Darren Fletcher had his effort blocked on the line by Andriy Shevchenko to give Chelsea all three points and keep the title race alive.