(Real win 2-1 on aggregate)
Zinedine Zidane ensured Real Madrid qualified for the Champions League quarter-final with a first-half volley.
The French midfielder scored from close range after Michel Salgado headed David Beckham's deflected centre across goal.
Guti had already flashed a 30-yard volley just over and Raul glanced a header wide as Real dominated.
Real keeper Iker Casillas saved Ze Roberto's volley and Roy Makaay's low drive while Bastian Schweinsteiger's shot was deflected wide for Bayern.
The match between the European powerhouses, who have lifted the trophy 13 times between them, failed to live up to expectations and was lacking in goal chances but littered with fouls.
Tempers flared in injury time as Real struggled to keep the German side at bay and Guti clashed with several Bayern players, sparking an ugly fracas.
"It was bound to happen at some stage," Beckham said of the altercation, "Both teams really wanted to win."
Raul started up front as Madrid's lone striker despite missing the weekend draw at Racing Santander with an injured ankle.
Bayern chose to include Willy Sagnol after the right-back had a metal plate inserted in his left arm to combat a fracture.
And it was the home side that started strongly - Guti came closest to breaking the deadlock, but his measured volley from 30 yards flew just over.
Bayern's frustration as Real controlled the tempo was evident when Ze Roberto was booked after a heavy challenge on Beckham.
Zidane was becoming more influential as Real threatened a goal and it was his cross that almost provided it, but Raul's glancing header drifted agonisingly wide.
But with just over half an hour played, the mercurial Frenchman pounced to ensure Real's safe passage into the quarter-final.
Raul twisted and turned on the edge of the box before finding Beckham and when the England captain's cross was deflected by Ze Roberto, Salgado was quickest to react and his header across the six-yard box was gleefully hooked home by Zidane.
Bayern looked to hit back but home keeper Casillas got down well to parry Ze Roberto's 20-yard thunderbolt.
Makaay was next to try his luck after he was put clear by Michael Ballack, but Casillas pushed his fierce low drive was past the right-hand post.
And when Casillas was eventually beaten, Salgado was on hand to clear Claudio Pizarro's shot, which came through a crowd of players, off the line.
Real continued to dominate after the break - Santiago Solari blazed a 20-yard effort just wide from Raul's lay-off and David Beckham curled a free-kick into the side netting.
Guti almost wrapped up the win after being put through, but his strike from eight yards was blocked by Oliver Kahn and the rebound was scrambled to safety.
Substitute Schweinsteiger almost forced extra-time, but his shot was deflected agonisingly wide with Casillas stranded and with moments left, the Bayern midfielder fired an angled drive inches wide.
Real Madrid: Casillas, Salgado, Bravo, Helguera, Mejia,
Guti (Borja 90), Beckham, Figo, Solari (Cambiasso 90), Zidane,
Subs Not Used: Cesar, Portillo, Pavon, Nunez, Juanfran.
Bayern Munich: Kahn, Sagnol (Salihamidzic 67), Lizarazu,
Kuffour, Kovac, Demichelis, Ballack, Ze Roberto,
Hargreaves (Schweinsteiger 46), Pizarro (Santa Cruz 68), Makaay.
Subs Not Used: Rensing, Rau, Jeremies, Linke.
Booked: Ze Roberto, Lizarazu.
Referee: Urs Meier (Switzerland).