Diego Simeone's side were on course for a victory after a Villarreal own-goal in the second minute.
Juanfran's cross forced Mario to head into his own net under pressure from Koke, and the visitors then put in a typically abrasive performance in an intense tussle.
Villarreal were finally rewarded for their endeavour when Jeremy Perbet got to the line and crossed to the near post where striker Ike Uche slid in with Juanfran, and the Atletico defender poked the ball over the line in the 79th.
Second-placed Atletico moved on to 34 points from 13 games, the same as unbeaten leaders Barcelona, who visit struggling Real Betis in Sunday's late game.
Earlier, there were whistles at Mestalla after Miroslav Djukic's Valencia came from behind to draw 2-2 against his former club Real Valladolid with a 75th-minute strike from substitute Sofiane Feghouli.
The hosts got off to a woeful start, Ever Banega hoofing a penalty over the bar after only five minutes, and they then conceded a ninth-minute Javi Guerra header.
Colombia striker Dorlan Pabon's long-range effort put Valencia level in the 29th, and after Valladolid notched a second through Gilberto Garcia just after the re-start, Feghouli rescued a point for Djukic's inconsistent side.
Sevilla ended a run of 22 consecutive road games in La Liga without a win when they triumphed 3-1 at Espanyol.
The Andalusians last won an away league fixture in September 2012, beating Deportivo La Coruna 2-0, and coach Unai Emery was feeling the heat after five games without a win in all competitions.
Quick goals from Federico Fazio and Vitolo gave Sevilla the advantage and Carlos Bacca made sure of the points with an impressive third in the 58th minute, running from the halfway line to fire home.
- Sports & Recreation
- Miroslav Djukic