Substitute Thiago Pitarch's strike from the edge of the box had looked like it would be the winner before Abdul Okunola converted from close range to level the game in added time.
The defender's first goal for the under-21s came after Sergio Mestre saved senior goalkeeper Gavin Bazunu's goalbound header into his path.
It caused wild celebrations from the nearly 11,000-strong crowd at St Mary's and was a reward for the hard work Saints had to do in the second half.
"I'm incredibly proud of us. When making the transition to men's football and really understanding what it takes to win a game, sometimes you can't replicate a moment like that," he said.
Cam Bragg made his Championship debut for Saints against Blackburn Rovers. _(Image: Matt Watson/Southampton FC)_
"We needed to just fight, and suffer and work, and it takes one moment of good quality, from Gav of all people, and we get something out of the game.
"They are a very good Real Madrid team. I'm incredibly proud, and I want to say a massive thank you to the fans who came out to support us today."
He added: "The thing with football is that, at 1-0, sometimes 2-0, you are never out of a game. It takes one moment of real quality.
"We had one where we won the ball off a transition, and maybe that was our moment. Then we had two set plays, one of which went over the bar - we should have done better.
"Another one we scored from. You are never, ever out of the game. After their first goal, we had to suffer and didn't touch the ball for three or four minutes.
"How do you show that character and belief that you will get your moment? Today we did, and it was a pretty incredible one."