Barcelona suffered a third home defeat in a row on Sunday as Alvaro Garcia's early goal earned Rayo Vallecano victory at Camp Nou and left Real Madrid needing only to draw at home to Espanyol next weekend to win La Liga.
The Catalans remain second ahead of Sevilla but trail leaders Real by 15 points with five games left to play and Carlo Ancelotti's men will be crowned champions on Saturday if they avoid defeat to Espanyol at the Bernabeu.
Barcelona should still have enough for the top four given they sit six points clear of Real Betis in fifth, with five games left to play, but winning this game in hand against an out-of-form Rayo side would certainly have made the run-in more comfortable.
"There are games that get complicated because we don't start how we should," said Barca coach Xavi. "It's a shame because it was a golden opportunity."
Barca's wretched form has seen them win only twice in their last six matches and exit the Europa League to Eintracht Frankfurt.
"We're struggling a lot at home," said midfielder Sergio Busquets. "We're in this negative dynamic at Camp Nou. We have a cushion and we had a chance to take advantage but we haven't managed it."
Xavi talked on Saturday about "recovering the sensations" of a few weeks ago, when a 4-0 thrashing of Real Madrid at the Santiago Bernabeu looked set to place Barcelona even as favourites in La Liga next season.
But that feels like a distant memory now, with the team's season in danger of ending with a whimper.
Missing out on the Champions League would be unthinkable for Barcelona, who started the season with debts of more than €1 billion ($1.08 billion).
Missing out on second place would have consequences too given qualification for the Spanish Super Cup is also believed to be worth around €8 million to the Catalans, according to leaked reports.
Sevilla, in third, are level on points with Barcelona while Atletico Madrid, in fourth, are two points behind.
Rayo, meanwhile, move up to 11th in the table, reaching the 40-point mark that should guarantee their survival.
After a brilliant start to the season, promoted Rayo went 12 games without a win between February and April but any concerns about relegation are surely now over.
They took the lead in the seventh minute when Isi Palazon danced through Barcelona's midfield and spotted the curving run of Alvaro Garcia, who had dashed inside from the left.
Sergino Dest was too slow to react and Garcia struck quickly, controlling with his left and firing in with his right, giving Marc-Andre ter Stegen no chance to adjust.