The midfielder, 32, was one of three Blancos players who went into the tie a yellow card away from being ruled out of the showpiece event alongside Sergio Ramos and Asier Illarramendi.
A needless challenge on Bayern midfielder Bastian Schweinsteiger in the 38th minute was enough for the referee to reach into his pocket and punish Alonso, despite pleas from Luka Modric for leniency.
Madrid led Bayern 4-0 on aggregate at halftime after Sergio Ramos scored twice early and Cristiano Ronaldo added another to leave Pep Guardiola's men looking destined to exit the competition.
The winner of Real Madrid-Bayern will face either Atletico Madrid or Chelsea, which are level on 0-0 with the second leg to be played on Wednesday.
Alonso won the Champions League before, against current coach Carlo Ancelotti, when he lifted the elite European trophy with Liverpool in 2005 after scoring the equaliser in the 3-3 result which ended in a penalty shoot out victory to the English side.