Two strikes from forward Klose and a goal from midfielder Ribery put Bayern 3-0 up at half-time before the home side fought back at the Stade de Gerland. And unbeaten Bayern now go into the first knock-out stage next year with 14 points from six matches, the 2001 winners' best-ever tally at this stage of the competition, with four wins and two draws.
"We've deservedly finished top of a difficult group, so we're delighted and a little bit proud," said coach Jürgen Klinsmann on the Bayern website, calling the the first half "tremendous."
"The way we played, with one and two touch football, getting into the box and turning chances into goals, was really first class. It was incredibly enjoyable. It was a fantastic first half, top quality football."
He admitted, however, in the second half, Bayern shifted down a gear and Lyon hit their stride.
Bayern's Germany defender Philipp Lahm insists there is still room for improvement as Bayern allowed Lyon to fight-back as second-half goals from Lyon veteran Sidney Govou and striker Karim Benzema slashed the arrears.
"We can live with the result, but not the way we played," said Lahm. "We let them have far too many chances. We made excellent use of our own chances, but otherwise we made too many mistakes."
Bastian Schweinsteiger, who has signed a new contract at Bayern which will keep him in Munich until at least 2012, said the Germans were made to work for the win.
"We're pleased and proud that we've won, as it turned into a very tough match," said Schweinsteiger. "I believe this team can go a long way in the Champions League. We're improving all the time and we're winning our matches. It's a real advantage playing the first leg away from home in the next round."