Messi, who now has 33 goals in all competitions for Barcelona this season, took two shots before slotting home in the 26th minute. He curled a free kick into the top right corner and off the hand of diving Atletico goalkeeper Jan Oblak to reach the landmark.
It was the fifth La Liga goal Messi has scored from a free kick since Jan. 1, and prior to Messi's success, Oblak had not allowed a league goal from a free kick since Real Madrid's Cristiano Ronaldo scored on Nov. 19, 2016, according to ESPN Stats & Information.
Atletico's best chance at an equaliser came in the 86th minute, but Kevin Gameiro's volley was disallowed with Diego Costa ruled offside. They had won their previous eight games in all competitions to move into second place in La Liga.
Luis Suarez was also ruled offside on a disallowed goal in the 76th minute, and Messi nearly scored another in added time but his attempt sailed high.
Barcelona captain Andres Iniesta was taken off injured in the 36th minute with an apparent leg injury after a collision earlier in the game with Atletico's Saul Niguez.
The victory extends Barcelona's unbeaten streak in the league to 34 games, dating to last season.