Dropped points for Spain's leading pair allowed Sevilla to make up some ground at the top, with Julen Lopetegui's side beating Espanyol 2-0 to jump above Atletico and into second.
Atletico had earlier slipped to their first loss of the season at Alaves who struck their first win, having lost all of their previous five games and failed to score in any of the previous four.
It meant Real Madrid could have gone five points clear by beating Villarreal but settled for a three-point lead after a scruffy performance came in stark contrast to their slick, 6-1 thrashing of Mallorca in midweek.
Marco Asensio scored three and Karim Benzema two in that game but both were quiet at the Santiago Bernabeu, where Carlo Ancelotti got his wish for tighter defending, but at the expense of his team's fluidity in attack.
Villarreal, meanwhile, remain unbeaten yet have their own problems in front of goal, this their fifth draw from their opening six games, which is enough only for 10th.
They were the better side in the first half, spearheaded by their two speedy wingers in Danjuma on the right and Yeremy Pino on the left.
Danjuma surged past Fede Valverde but his shot was tipped wide by Thibaut Courtois before Pino then created a chance for Paco Alcacer before Francis Coquelin’s follow-up was blocked.
Madrid were restricted to shots from distance as Benzema and Valverde tried their luck while the fans were most animated by an optimistic penalty appeal after Nacho Fernandez was blocked off.
After half-time, Madrid improved, Benzema and Eder Militao both going close with headers while Villarreal looked dangerous too, Danjuma forcing another Courtois save on the break before Pau Torres was inches away from tapping in at the back post.
Ancelotti brought on Eden Hazard and Madrid turned the screw in the last 10 minutes as Hazard crossed for Isco but his header was hacked away. Vinicius cut inside and looked to have the opening, but blazed over.
Atletico Madrid's attacking problems appear more entrenched as their rocky start to the season continued with a shock 1-0 defeat by Alaves.
Victor Laguardia's header in the fourth minute was enough for an unexpected victory for Alaves, who sat 20th at kick-off.
Diego Simeone's side have managed only two wins from their last six games in all competitions and this was the third time in four matches that they have failed to score.
"Obviously we lacked ideas," said Simeone. "I don't think it's a system problem. It's about aggression, in defence, and other situations."
Atletico face Barcelona next weekend after travelling to AC Milan in the Champions League on Tuesday, a game made more important after a goalless draw at home to Porto cranked up the pressure in a group that also includes Liverpool.
Simeone again started with Antoine Griezmann alongside Luis Suarez up front, but the pair mustered only one shot between them, from Suarez, with Griezmann outshone by Angel Correa when the Argentinian was brought on in the second half.
The pressure on Griezmann's place in the starting line-up is increasing. Joao Felix, who was watching from the stands as he served a suspension, will return and Correa looks the most in-form partner for Suarez.
Alaves had been without a goal in almost 400 minutes but scored in the fourth as Laguardia got a run on Stefan Savic at a corner from the right and headed in at the back post.
An uneventful match livened up in the second half as Laguardia was called into defensive action, clearing Rodrigo De Paul's free-kick off the line after the ball had bypassed everyone in the box.
Alaves should have made the victory more secure but Mamadou Loum and Pina both blazed glorious opportunities over the bar.
Correa had come on for Atletico as Simeone tried to spark his team and the striker went close with a near post drive but was denied, leaving Alaves to see out a remarkable win. (AFP)

Khan warns Paul ahead ‘life-threatening’ Joshua fight
Emery's perseverance & belief key to Villa resurgence
Agu backs Okoye for Eagles No. 1 spot
PFL contract ends soon - Ngannou
'No-one downing tools' - Alonso's stay of execution despite loss to Man City
Zaha in Ivory Coast Afcon squad but Adingra left out
UCL: Mbappé doubtful for Manchester City clash after missing training
'Give Alonso time' - but Man City visit could be pivotal
Fifa accused of breaching own rules with Trump award
Son, Simons and mini Spurs revival lift Frank's spirits
Finidi challenges Rivers United players’ mentality
Rangers International going, going . . . (63,402 views)
Amaju Pinnick: A cat with nine lives (54,646 views)
Second Term: Amaju Pinnick, Other NFF Heavyweights Home to Roost •How Pinnick Broke the Jinx (52,587 views)
Current issues in Nigerian sports: Matters arising (52,220 views)
Sports Development: Zenith Bank on the zenith (52,194 views)
Missing $150,000 IAAF Grant: Solomon Dalung’s Hide and Seek game (52,105 views)
Gov. Abdullahi Ganduje’s solid footprints, commitment to sports development in Kano State (51,950 views)
NFF Presidency: Pinnick, Maigari, Ogunjobi, Okoye in Battle for Supremacy (51,535 views)
Olopade, BET9A wave of revolution in NNL (50,676 views)
Commonwealth Games 2018: Shame of Muhammadu Buhari, Solomon Dalung (49,224 views)
Ibrahimovic’s Man U exit: Whose decision is it? And in whose interest? (47,618 views)
John Mikel Obi: Segun Odegbami’s Outrageous Call! (47,090 views)