Having seen rivals Barcelona close the gap at the top to a point with a 3-1 win over Granada on Saturday, Real initially looked like matching them after Cristiano Ronaldo's second-half penalty.
Ronaldo's spot-kick gave Carlo Ancelotti's men the breakthrough following a foul on the forward inside the area from Eric Bailly early in the second period.
However, a spirited and hard-working Villarreal side drew level 12 minutes later when Gerard Moreno seized on a loose ball to equalise from the edge of the area.
Moreno's effort was the first goal Real conceded since the 4-0 defeat at the start of last month to city rivals Atletico Madrid - who also dropped points on Sunday with a draw at Sevilla.
The result leaves seven points separating the top three, with Villarreal claiming an impressive point in their bid to seal European qualification.
Amid a low-key opening, the visitors threatened first as Iker Casillas denied Moreno one-on-one before Dani Carvajal was forced to clear Moises Gomez's follow-up off the line.
Karim Benzema headed Toni Kroos' delivery off target before Pepe looped a header over from the German's free-kick after 22 minutes as Real began to assert their quality.
While clear-cut chances were few and far between in the opening half hour, Marcelo's dangerous cross almost beat Sergio Asenjo at his far post before Raphael Varane headed wide from a corner.
Villarreal looked to have suffered a blow when Bailly was taken off on a stretcher after an apparent face knock, although the Ivorian returned before the break to help the visitors reach half-time level.
Ronaldo shimmied and fired at Asenjo shortly after the restart and, when the Portugal captain was hauled down in the area by Bailly when awaiting a cross, Real had their opportunity to open the scoring.
And Ronaldo duly kept his composure to slot home his 30th league goal of the season - beating Asenjo comfortably to the goalkeeper's left.
The Portuguese came close to doubling his tally when a goal-bound free-kick was deflected off target by the Villarreal wall before Real were pegged back by Moreno's impressive strike midway through the second half.
The ball broke loose on the edge of the area, with Moreno guiding a strike past Casillas to draw the visitors level.
Ronaldo looked on course to single-handedly seal maximum points as he broke free down the left only to be thwarted by Asenjo before seeing a header palmed away by the visiting goalkeeper.
Bailly was perhaps fortunate not to concede another penalty as he appeared to shove Hernandez late on, only for referee Jose Gonzalez to wave away the Mexican's furious appeals as an under-par Real failed to find a winner.
It could have been worse for Real however, had Luciano Vietto maintained his balance when free on goal instead of stumbling at the crucial moment.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.