Pepe's towering header early in the second half looked to have Madrid heading five points clear at the top.
However, Barcelona now have a third straight title back in their own hands after Griezmann rounded Keylor Navas to slot home at the near post.
Real lead Barcelona by three points with eight games left, but the two face each other at the Bernabeu on April 23.
Barca can move top later on Saturday with victory at Malaga.
Atletico had won their three previous league visits to the Bernabeu and enjoyed the brighter start as Saul Niguez was inches away from opening the scoring inside five minutes when his header from Koke's cross flew just wide.
Cristiano Ronaldo's hat-trick separated the sides in a 3-0 Real win earlier this season and the World Player of the Year was first to threaten for the hosts as his near post drive was beaten away by Jan Oblak.
Griezmann hit the post at the other end but had already been flagged offside as Atletico maintained a threat on the counter-attack.
Griezmann hopes to add to impressive Bernabeu winning streak
However, Real took control of the game as the first half wore on and only two stunning stops prevented Zinedine Zidane's men from taking a half-time lead.
Firstly, Oblak tipped over Karim Benzema's effort after a neat one-two with Ronaldo had freed the Frenchman inside the box.
Moments later Ronaldo couldn't believe his eyes when his fierce goal-bound effort was turned to safety by Stefan Savic's incredible headed clearance from under his own crossbar.
Griezmann was nearly gifted the opener just before half-time as he intercepted Sergio Ramos's wayward crossfield pass and bore down on goal.
But Griezmann narrowed his own angle by verging left onto his favoured foot and his low effort was turned behind by Keylor Navas.
Morata’s hat-trick leads Ronaldo-less Real to crucial victory
Real started the second half with intent as Ronaldo headed just wide before Oblak had to rush from his goal to block Benzema's volley from point-blank range.
The European champions finally made the breakthrough just seven minutes into the second period when Pepe rose highest in a crowded penalty area from Toni Kroos's free-kick to power a header into the far corner.
However, Atletico responded to falling behind and should have been level on the hour mark when Yannick Carrasco played in Fernando Torres clear on goal.
Enrique hails ‘dream’ first-half performance as Barcelona thrash Sevilla
The former Spanish international failed to finish, though, as he fired straight at the onrushing Navas.
Navas has faced a barrage of criticsm this season, but he made another smart stop to deny Griezmann levelling with an outrageous overhead kick attempt.
The French international wasn't to be denied from another excellent through ball from Carrasco with five minutes remaining, however, as he coolly fired past the advancing Navas at the near post for his 23rd goal of the season.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ