Joshua Kimmich opened the scoring for the home side just before the half-hour mark, but a defensive lapse on the stroke of half-time, coupled with a fine strike from Real Madrid's Marcelo, pulled the La Liga giants level heading into the break.
Marco Asensio netted the winner just before the hour mark after a Rafinha turnover and despite a host of late chances, the Bundesliga champions were unable to find a reply.
After the match a number of Bayern stars were quick to show their disappointment in the result against a Real Madrid side that Niklas Sule deemed "weak".
"Nobody could have moaned if we won this match 5-2," Sule said after the match. "I think I never saw Real Madrid this weak in a match in Munich."
When asked about Sule's statement, Kimmich claimed that the scoreline should have been even more lopsided.
"I'd go with 7-2," the right-back said. "I think you've seen the game too. We have two or three more chances in the first half, and in the second half Franck Ribery had a few more. I can not list all the chances, but there were six to seven good ones."
Former Madrid star James Rodriguez also felt hard done by, claiming that Madrid scored with their only two chances on the night.
"We had five clear chances and they only had two," he is quoted as saying by Marca. "We leave this match very annoyed."
Bayern understand their current situation well enough after having faced the same result in a quarter-final first leg against Madrid last season.
In that tie, the Bavarians managed to push the tie into extra time, only to have Madrid score three times in the added 30 minutes to earn a spot in the semi-final.
And Bayern's players are confident that they can still turn the tie around at the Bernabeu.
"There are two games, so we are not out yet, even if the starting situation is not good but very bad," Kimmich said. "Nevertheless, everything is possible in football, that's why many people watch football. We want to make it possible next week."