Substitute Enes Unal struck deep into injury time for Villarreal as Javier Calleja's side came from behind to secure a 2-1 win over 10-man Atletico Madrid at the Estadio de la Ceramica in La Liga this evening.
Antoine Griezmann's 17th league goal had looked likely to claim a slender away win for Diego Simeone's men, only for Turkish international Unal to equalise eight minutes from time, before then going on to add another late finish to give the hosts a memorable win in Castellon.
Both sides started with plenty of industry and endeavour, but it was Atletico who profited from some early controversy when Griezmann seemingly went down a little too easily under pressure from Juame Costa inside the box.
The officials favoured the Frenchman's shouts and the visitors were soon awarded a penalty, allowing Griezmann to step up and coolly send Sergio Asenjo the wrong way to hand Atletico a 1-0 lead in the 19th minute.
Simeone's charges might just have found a second goal a few minutes later after a number of cute passes, although Koke saw his shot cannon back off the post after seemingly beating Asenjo with a clever drive down low.
Villarreal suffered from a bluntness in attack during the opening half and perhaps their best chance fell to Pablo Fornals, who benefited from some uncharacteristic Atleti sloppiness at the back, although he sent his shot wide of Jan Oblak's post.
The first period proved to be more notable for its industry than its quality, but Madrid might have cemented their advantage on the counter just before the interval, neither Angel Correa or Diego Costa proving decisive enough to finish a move inspired by Griezmann's sharp movement.
Atletico dropped deep in the second half to establish a war of attrition and Villarreal might have come up trumps with 25 minutes remaining, although Carlos Bacca was unfortunate not to win a penalty when he went down under pressure from Jose Gimenez.
The visitors were set up for the counter and they should have grabbed a two-goal cushion minutes later when Correa broke to feed Griezmann, but he sent his effort blazing over the bar from the edge of the area.
At first the closing moments of the contest seemed to offer little of note, but Villarreal saved their best until eight minutes from time, when substitute Unal rose brilliantly to meet Alvaro's cross and send a timely equaliser beyond Oblak to make it 1-1.
The action did not stop there, though, as Unal soon returned during injury time to seal a remarkable comeback win, this time as the striker got on the end of a loose shot at the back post to poke home past Oblak.
The prevailing festivities proved too much for Atletico substitute Vitolo in the dying embers, as he then saw red for a petulant shove on Nicola Sansone, with his dismissal bringing an end to a regrettable afternoon for Los Rojiblancos.
VILLARREAL (4-3-3): Asenjo; Mario, Bonera, Alvaro, Costa; Trigueros, Rodrigo, Soriano (Sansone, 63'); Fornals (Unal, 74'), Bacca, Raba (Castillejo, 78')
ATLETICO MADRID (4-4-2): Oblak; Vrsaljko, Gimenez, Godin, Lucas; Thomas, Saul, Correa (Vitolo, 71'), Koke (Torres, 85'); Costa, Griezmann (Gabi, 81')