Ronaldo put Real ahead with a second half penalty after being pulled down and had 13 shots of goal in a lively display, but his team was unable to secure a fourth consecutive win.
Gerard Moreno's thumping low strike 26 minutes from time spoiled the home party and Real has seen its lead at the top cut to two points after Barcelona's win Saturday.
The arch rivals meet in El Clasico on March 22, with the title very much up for grabs.
Villarreal, coached by Marcelino, even fielded an understrength side as it bids to progress in the Copa del Rey and the Europa League, but should have been ahead early when Iker Casillas made a fine save from Moreno and then Dani Carvajal spectacularly headed Moi Gomez's follow-up effort off the line.
Real was turning up the heat and Gareth Bale went close for the European champions with a header, while Raphael Varane went even closer with a header that also just missed the target.
Ronaldo was a constant threat and after the break he was pulled down inside the area by Eric Bailly and converted from the spot.
Bale and Ronaldo should have doubled the scoreline, but Real was made to pay for its wasted chances when Moreno stunned the home crowd with the leveler.
Champion Atletico Madrid missed the chance to close to within five points of Real at the top after being held to a 0-0 draw at Sevilla earlier Sunday.
Valencia moved to within a point of Atletico after beaing David Moyes's Real Sociedad 2-0 with a double from Pablo Piatti.
Wolfsburg wins thriller
In the Bundesliga, VfL Wolfsburg kept up its dogged pursuit of Bayern Munich with a 5-3 win at Werder Bremen in a thrilling eight-goal encounter.
Wolfsburg striker Bas Dost scored a double to make it 14 goals in his last nine appearances but his side still trails Bayern by eight points despite its impressive recent form.
The match had been under threat due to a security alert in the north Germany city of Bremen, but it was downgraded with extra police on duty at the 42,000-capacity Weserstadion stadium.
Earlier police had made two temporary arrests and searched an Islamic cultural center.
Monaco holds PSG
In Ligue 1, Monaco, so impressive in beating Arsenal in midweek Champions League action, held Paris Saint-Germain to a goalless draw.
PSG was hoping to leapfrog Lyon at the top, but could not break down the stubborn Monaco defense, keeping its 10th clean sheet in the last 11 matches.
Lyon, beaten 2-1 at Lille Saturday, still leads title holder PSG by a point at the top.