Santi Cazorla proved his class as he scored twice for Villarreal to deny Real Madrid a chance to make further inroads on La Liga leaders Barcelona.
The visitors, who made a pre-Christmas trip to the Club World Cup, looked tired and faced a rejuvenated Cazorla, who has suffered a long injury lay-off.
His curler earned an early lead before Karim Benzema’s header made it 1-1.
Raphael Varane nodded in to put Real ahead, but Cazorla’s late header moved Villarreal out of the relegation zone.
Santi Solari’s Real remain fourth, seven points behind Barcelona, four behind second-placed Athletico Madrid and two behind third-placed Sevilla.
Real’s night was not improved by Gareth Bale being substituted at half-time with what appeared to be a hamstring injury.
And they were made to pay by a Villarreal team, who merited at least a point for their superior attacking endeavour and had a midfielder who showed why he was so revered while at former club Arsenal.
The hosts were inspired by Cazorla, who scored his first La Liga goals of the season after a nightmare two years following an horrific Achilles tendon injury, which needed 11 operations.
The 34-year-old returned to his former club Villarreal last summer after six years with the Gunners, but he had spent the last two on the sidelines leading to doubts about his ability to walk because of bacteria “eating” eight centimetres of his ankle tendon.
His opener showed the kind of grace which lit up north London for four years, when he latched onto the impressive Samuel Chukwueze’s pass and curled a right-footed shot past the out-stretched Thibaut Courtois.
A rare header from the diminutive Spaniard, which left the home crowd in raptures following Pablo Fornals’ cross, also proved Cazorla had lost none of his nous on when to arrive in the penalty area.