Sergio Ramos lifted Los Blancos fans, who watched Cristiano Ronaldo go off injured early on, by hitting a superb free-kick to give the visitors the lead after they had to weather a storm from the hosts.
But just as they looked to have tied up the points, Osorio headed home in the closing stages to give his side a lifeline and leave Madrid almost needing a miracle to win the title.
Real boss Carlo Ancelotti confessed: "We had the match under control for 70 minutes, but then we took our foot off the ball, started defending deep and conceded a goal from a dead ball situation. It wasn't a case of a lack of attitude because Iker hardly had a thing to do all night. Winning La Liga will be very difficult, but it's still mathematically possible. We have to carry on and win our remaining two La Liga games. I'm not concerned about who the favourites are to win the title.
"We made a few mistakes as we lacked the mental energy for a match of this kind, near the end of the season. That mental energy is what we were lacking, but as far as I can see the team is not physically tired. Physically we're fine. It's difficult to recoup that energy, which is so important at this stage of the season, after playing in a Champions League semi-final."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball