Didier Drogba rescued a dramatic point for Chelsea with an equaliser in the third minute of stoppage time.
The Ivory Coast international striker pounced for his 10th of the season just when Jose Mourinho's team seemed to have been sunk by old boy Eidur Gudjohnsen.
Mourinho had poked fun at Gudjohnsen on the eve of the game - but the Icelander answered with a goal in the 58th minute to put Barcelona 2-1 up.
It looked like being the winner until Drogba slid the ball under keeper Victor Valdes in the final moments.
Deco had fired the European Cup holders into an early lead but Frank Lampard equalised with a fantastic chip from the tightest of angles.
Mourinho's team are now virtually assured of a place in the last 16 of the competition.
It was a stormy game with 10 yellow cards - six for Chelsea - while Barcelona thought Ashley Cole should have been sent off.
Italian referee Stefano Farina appeared to show the England left-back two yellow cards in the first half - but it later emerged the first had been for Lampard.
Chelsea fell behind in the third minute when Deco dashed down the left, twisted inside on to his right foot and netted.
Mourinho had called for Farina to be strong - but he was not. He was poor.
The crowd were quick to react when Drogba made a meal of a little nudge in the back, early in the game. Then Drogba was in the thick of it again when he bumped into Motta as the Brazilian midfielder climbed to his feet.
Motta threw himself to the floor and Rafael Marquez grabbed the Chelsea striker.
This time Drogba crashed to the turf and players rushed to the scene to jostle each other.
Referee Farina failed to take control at this point and the tension crackled away.
Ronaldinho tried to get Michael Essien sent off, claiming he had used an elbow on Gudjohnsen when he had actually caught him in the face with his wrist.
Farina was reaching into his pocket for his yellow card, a few minutes later, to book two Chelsea players for dissent.
He flashed the first yellow in the direction of Cole after giving a foul against Drogba. Lampard was standing near Cole at the time and it later emerged that he had been the one cautioned.
The booking for Lampard was his third of the competition and he will be suspended from Chelsea's next game, away to Werder Bremen.
The seriousness of the confusion became clear, 10 minutes later, when Cole mistimed a tackle on Motta and was booked.
He showed the defender a yellow card but did not produce a red - and memories of Graham Poll in the World Cup were rekindled.
Barcelona players crowded the referee to convince him that the full-back was already in the book.
Farina went to the touchline to talk to Mourinho. He came back and booked Messi, presumably for something said - but still did not show Cole a red card.
Drogba needed lengthy treatment at the start of the second half after taking a blow to the face in an aerial clash with Carles Puyol.
Valdes made another excellent save to keep out a good header from Robben, destined for the bottom corner, then made further good stops to deny Robben and Essien.
Robben fired a glorious chance over when he should have scored but Lampard levelled in the 52nd minute with a delightful piece of skill.
The England midfielder initially miscontrolled a pass from Makelele and was driven wide of goal.
It looked an impossible angle, tight to the touchline, but Lampard somehow curled a chip over Valdes and inside the back post.
Chelsea were well on top and looking for the win when Rijkaard made a change, bringing on Edmilson for Motta.
Barca were soon back in front with Ronaldinho dancing past Boulahrouz before finding Gudjohnsen, who slid the ball into an open goal. Lampard wanted a penalty for a pull on his shirt by Xavi in the 65th minute but his appeals were ignored.
Gudjohnsen took his bow early, replaced by Ludovic Giuly, 13 minutes from time. And after Ballack had squandered a glorious chance to pull Chelsea level, on-song Drogba found the target, with captain John Terry assisting.