With the scores level just after the break in Tuesday's second-leg, Ulreich's blunder gifted Karim Benzema his second goal and Real the lead.
Ulreich somehow missed a back-pass from Corentin Tolisso, leaving Benzema to tap into an empty net.
Bayern fought back from the blow but fell short. James Rodriguez equalised, but the game finished 2-2 and Real Madrid advanced 4-3 on aggregate.
The German giants lost to Spanish opposition in the knock-out phase for the fifth year in a row.
"Words can not describe how disappointed I am about exiting the Champions League," wrote Ulreich on his Instagram page.
"We really wanted to go to the final, we did our best and then this unnecessary mistake happened - I cannot explain it.
"I'm sorry... for my team and for you fans."
Ulreich has been Bayern's first-choice goalkeeper since Germany's captain Manuel Neuer was injured last September.
His good performances helped Bayern secure a sixth straight Bundesliga title last month and after his social media post, team-mates quickly offered support and comfort.
"You saved our ass many times, Ulle" replied Spanish international Javi Martinez.
"Head up! We win together, we lose together," said defender Jerome Boateng, who missed the game injured.
"Heads up. We are a team," wrote Colombian midfielder James Rodriguez.
Bayern's hopes of winning the treble faded in Madrid, but they can still finish with the double as they face Eintracht Frankfurt in the German Cup final on May 19 in Berlin.