At the Camp Nou Stadium, hosts Barcelona were quickly ahead against a side struggling for confidence and form and quickly took the lead when Paco Alcacer, in the side for the suspended Luis Suarez, side footed home from 10 yards out.
Lionel Messi scored for the sixth game in a row in all competitions and for the 25th time in this league campaign when he doubled Barca's lead in the 30th minute with a deadly strike into the bottom corner from the edge of the area. Valencia are fourth while Villarreal climbed above Sevilla into fifth after Vincenzo Montella's side were beaten 2-1 at Leganes.
Ronaldo has scored at least one goal in his last eight matches, and he took his league tally to 22 goals, one more than Barcelona's Luis Suarez and three behind top scorer Messi.
Atletico were on course to record a 12 win in 13 games in all competitions, after Antoine Griezmann had converted a controversial penalty.
Unal was not done there as he netted the winning goal in the first minute of stoppage time with a close range finish.
The Catalans were rampant in the first half and could have taken a heavier lead into the break as Brazilian midfielder Philippe Coutinho hit the woodwork twice.
Barca lead the standings on 75 points with nine games remaining.
Coutinho, the club's record signing, struck the woodwork for a second time as he tried to lob Kepa after latching onto a clever lofted pass from Paulinho, who then smacked a curling shot of his own against the upright.
"We were controlling the game well but in the end they took advantage of those two plays", Atletico coach Diego Simeone said.
Barcelona coach Ernesto Valverde promised no let up from his side despite them going 11 points clear at the top of La Liga.
Ronaldo scored once in the first half and three times in the second, reaching 21 goals in his last 11 matches in all competitions.
Atletico have not managed to beat Villarreal at home or away since April 2015.
Atletico enjoyed the lion's share of possession in the opening exchanges, with Villarreal happy to soak up the pressure and play on the counter-attack.
They vented their fury at him again in the second half when he refused to award them a penalty kick when Carlos Bacca went down in the area.
"There's no explanation for what happened, we didn't defend well from the two set pieces and next time we need to be more focused", said Atletico midfielder Saul Niguez.
"I have the sensation that I lost us the game", added Simeone.
Ronaldo struck four goals in a game for the first time this season in Real's thrilling 6-3 win over Girona.
Barcelona's Argentinian forward Lionel Messi celebrates scoring his team's third goal during the UEFA Champions League round of sixteen second leg football match between FC Barcelona and Chelsea FC at the Camp Nou stadium in Barcelona on March 14, 2018.
Sevilla lost 2-1 to Leganes, putting at risk its chances of securing a Europa League spot.