Real beat Athletic Bilbao 1-0 at San Mames on Sunday thanks to a second-half goal from defender Nacho Fernandez to move them on to 81 points.
Unfortunately for Real, city rivals Atletico scored two late goals from Renan Lodi and Luis Suarez to see off Osasuna 2-1 and stay top of the table.
The victory took Atletico on to 83 points after 37 games, two ahead of second-placed Real.
Atletico visit Real Valladolid on the final day of the season next Sunday while Real host Villarreal.
Barcelona had realistically needed Real and Atleti to slip up to stand any chance of winning the title, but a 2-1 home defeat to Celta Vigo officially ended their hopes.
Additional reporting by Reuters.