Big-money buys keeping Real hopes alive
However another erratic performance on Wednesday at Real Mallorca, fourth after winning 14 of 17 home matches this season, could inflict a fatal blow to Real.
Ronaldo's 89th-minute header, his second goal of the night, snatched a 3-2 win over 12th-placed Osasuna at the Bernabeu on Sunday to close the gap on Barca to one point after Kaka's late strike at relegation-threatened Real Zaragoza the previous weekend gave Real a 2-1 success.
Real paid around 160 million euros for the pair in the close season, with Portuguese Ronaldo joining from Manchester United for 94 million and Brazilian Kaka moving from AC Milan for 65 million.
"It was our worst defensive performance of the season and we suffered a lot," coach Manuel Pellegrini told reporters on Sunday.
"You cannot deny (Ronaldo's) importance and he makes a difference without doubt," the Chilean added. "Luckily he is playing for us right now."
Title holders Barca, who recovered from Wednesday's Champions League elimination by Inter Milan to thump Villarreal 4-1 on Saturday, can go four points clear with a win at home to third from bottom Tenerife on Tuesday.
Victory will lift Pep Guardiola's side to 93 points with two matches left, surpassing Real's record tally of 92 under Fabio Capello in the 1996/97 season when there were 22 teams in the division instead of 20.
Promoted Tenerife have made a late bid to avoid the drop by winning three out of four games.
Barca's final two matches are at fifth-placed Sevilla and at home to second from bottom Real Valladolid. Real host Athletic Bilbao, in eighth, and play at Malaga, also in danger of going down, on the final day of the campaign.
Forward Pedro said the morale of Barca's players was lifted by the display against Villarreal.
"It was an important match for us and we came out very focused and played a great game and really got a boost in confidence," said the 22-year-old.
"It seems crazy we already have 90 points and we are still having to fight for the league."
Valencia, 24 points shy of Real on 65, will secure third place if they win at home to basement side Xerez on Tuesday and Champions League qualification hopefuls Mallorca, six points behind on 59, falter against Real.
Sevilla (57 points) visit 16th-placed Racing Santander on Wednesday and Villarreal (52), five points behind the Andalucians in sixth and bidding for a spot in next season's Europa League, travel to mid-table Almeria on Tuesday.
Seventh-placed Getafe (51) host Sporting Gijon on Tuesday and Bilbao, eighth on 50, host Malaga on Wednesday.