The French side received a gift from Stuttgart, who registered their first European win this season, beating Glasgow Rangers 3-2 in Germany.
Lyon and Rangers split second spot with seven points each before they clash in Scotland in the last matchday for a round-of-16 berth.
Barcelona have already qualified before Tuesday's game.
In France, Andres Iniesta opened the scoring as early as the third minute, thundering a low shot home after he was set-up by neat cross from Bojan.
But the Spaniards couldn't celebrate for long as Juninho leveled after just five minutes.
He sent a 30-meter free-kick inside the area and the ball bounced off the floor, evaded anticipating players from both sides before sailing past goalkeeper Victor Valdes.
In the 58th minute, Juninho was forced to foul Barca's Lionel Messi inside the box and the Argentinean prodigy sent an ice-cool penalty past Remy Vercoutre.
The Brazilian playmaker made up for his error when he earned a spot-kick for Lyon and pinned it home ten minutes from time.
And Lyon were rewarded for their fight when Stuttgart produced a surprising performance to beat Rangers.
Ciprian Marica, Cacau and Pavel Pardo scored for Stuttgart while Charles Adam and Barry Ferguson notched goals for the visitors.