The Blues scrape past Romanian side while Liverpool end top of Group D with PSV Eindhoven win.
Chelsea overcame a bout of big-night nerves to book their place in the Champions League second round with a 2-1 win over CFR Cluj on Tuesday, while Liverpool - already through to the next stage - ended top of their Group with a 3-1 win over PSV Eindhoven.
Luiz Felipe Scolari's side lived dangerously at Stamford Bridge as they went in search of the victory that would guarantee their progress from Group A.
But the Blues, semi-finalists four times in the last five years, avoided an embarrassing early exit from Europe's elite club competition thanks to Ivory Coast strikers Didier Drogba and Salomon Kalou.
After a error-strewn opening, Kalou's clinical finish put Chelsea ahead before half-time, but Yssouf Kone rocked the Bridge when he headed an equaliser early in the second half.
At that stage, Bordeaux could have knocked out last season's runners-up with a win in Roma, but the French club conceded twice in the second half in Italy and Drogba came off the bench to seal Chelsea's spot in the last 16 with his second goal of the season.
It lifted the Ivorian to top of the all-time Chelsea European scoring charts on 19 - one ahead of Frank Lampard.
It was a far from convincing display from Scolari's men however and the Chelsea boss, whose side finished second in the group, will have to get more from his team if they are to reach the final again.
"I had confidence we would win but at 1-1 it is normal that me, my players and maybe some people in the stadium are nervous," Scolari said.
"We had more of the ball but there was not a big difference between the teams. We didn't play very well, we played ok, but they have the spirit I want in my team.
"They fight for the ball and even if they made mistakes, everyone understood this and fought to help them. They played as a team."
Cluj coach Maurizio Trombetta added: "Maybe Chelsea were a little nervous. When we scored they went down a little but in the end they managed to score again and we weren't able to get a result."
Scolari had insisted it wouldn't be the end of the world if Chelsea failed to qualify.
The Brazilian's laid-back approach was clearly meant to relax his players but they still looked nervous in the early stages.
A mistake by Jose Bosingwa gifted possession to Alvaro Pereira and the Cluj left-back fired in a long-range strike that Petr Cech spilled, then grabbed at the second attempt.
Alex should have eased Chelsea's anxiety when Deco picked him out with a curling free-kick, but the Brazilian defender's mistimed header bounced tamely over.
Scolari's side have struggled at home in recent weeks and again they were unable to find any attacking rhythm. They gave the ball away with alarming regularity and it took a goalline clearance to prevent Cluj punishing them when Hugo Alcantara headed Juan Culio's cross past Cech.
Chelsea were spluttering rather than moving smoothly through the gears and Scolari jumped from the bench to berate his players.
But the breakthrough they desperately needed finally arrived in the 40th minute after a lapse in concentration from the Romanians.
Ballack tumbled under Eugen Trica's challenge and, when Deco whipped in the free-kick, Kalou was left unmarked six yards from goal. Kalou took a sublime first touch before lashing his shot past Nunu Claro.
Cluj were never overwhelmed and they hit Chelsea with a perfectly timed sucker punch in the 55th minute.
Culio back-heeled to Cristian Panin and the defender's cross reached Kone, who rose above Alex at the far post to bury his header past Cech.
When Claro came to Cluj's rescue moments later with a superb stop from Joe Cole's close-range effort, the frustration around the Bridge was palpable.
Just as Chelsea were set for a nerve-jangling finale, news filtered through that Roma had taken the lead against Bordeaux, which all but clinched the Blues' qualification.
Scolari sent on Drogba for Kalou for the final 25 minutes and the powerful forward, who received a rapturous reception from the home fans, made an immediate impact.
In the 72nd minute, Mikel and Joe Cole combined to carve open the Cluj defence and Drogba's low finish gave Claro no chance.
It was Drogba's first goal since his coin-throwing antics against Burnley and his first in Europe since last year's semi-final win over Liverpool.
After missing most of the campaign, Scolari will hope Drogba's return acts as the catalyst for a Chelsea surge in the second half of the season.
In the other match featuring an English Premeirship side, PSV Eindhoven, playing visitors Liverpool at home and needing a win to secure a place in the UEFA Cup, took the lead through Danko Lazovic but they never seriously threatened to pull off an upset against opponents who emerged from their torpor in time to claim a convincing win.