Munich beat Napoli 3-2 with a first half hat-trick by Mario Gomez and an error-ridden second half on Wednesday to stand on the brink of qualification into the knockout stage of the Champions League Gomez scored three times in 25 minutes to take his Champions League goal tally to 17 and become his country's all-time top scorer in the competition, leafrogging Michael Ballack who has 16. The Italians managed to pull two goals back through Federico Fernandez and battled for a draw in a bad-tempered second half during which Napoli's Juan Zuniga and Bayern's Holger Badstuber were both sent off with second bookings as the Bavarians won their 10th European home game of the last 11. Bayern top Group A with 10 points from four games. Manchester City, who beat Villarreal, are second on seven with Napoli third on five. The Bavarians, who have scored an eye-popping 18 goals in their last four league home games, needed 17 minutes to settle in on a bitterly cold evening and take the lead when Gomez picked up a Bastian Schweinsteiger pass, wrong-footed defender Hugo Campagnaro and fired in a low drive. It was Bayern's 250th goal in the Champions League, only the fourth team to reach this number after Real Madrid, Barcelona and Manchester United. Germany international Gomez then struck again six minutes later volleying in a lovely chip from Toni Kroos. With Napoli desperately scrambling to figure out how to stop the Bayern onslaught, the hosts came close again, this time with Franck Ribery dribbling into the box and releasing from a tight angle only to see his shot palmed away by keeper Morgan De Sanctis. Gomez should have gotten a hat-trick when he raced clear with only De Sanctis to beat but his flick went wide. He did get it after 42 minutes, benefitting from confusion in the box to slot in from close range for his 13th goal in the last 10 Champions League games. Fernandez cut the deficit for the Italians just before the break with a well-time header and added another, almost identical goal 10 minutes from time as Bayern paid the price for an error-ridden second half.