Alaves were the only team to win at the Nou Camp in the league last season and looked set to overshadow Philippe Coutinho's first start for Barca when Sweden striker John Guidetti gave them a shock lead in the 23rd minute, falling over as he lashed the ball past Marc-Andre ter Stegen.
Luis Suarez finally levelled for the Catalans in the 72nd minute, scoring for the eighth league game in a row after some impressive saves from visiting goalkeeper Fernando Pacheco had kept Barca at bay, and Messi's sumptuous free kick in the 84th gave them a seventh consecutive league win.
Barca top the standings with 57 points, 11 above nearest challengers Atletico and 19 ahead of champions Real Madrid, who roared back from their miserable start to 2018 with an impressive 4-1 win at third-placed Valencia on Saturday.
Atletico went into the game with their confidence knocked down a peg by their King's Cup elimination to Sevilla but saw off 19th-placed Las Palmas with strikes from Antoine Griezmann, Fernando Torres and Thomas Partey in the second half.
The visiting side deployed a high defensive line and although they managed to cause Atletico problems they paid the price for their risky approach when Griezmann latched on to a rolled pass from Juanfran to race unchallenged towards goal and score in the 61st minute.
Griezmann had hit the post twice before scoring and was the catalyst for the second goal, intercepting a pass high up the pitch to help work the ball towards Torres, who beat a defender before producing a confident finish high into the net.
Partey nudged a Yannick Carrasco pass into an empty net in the 88th.
"It wasn't easy because of the circumstances of the previous games and we lost (Kevin) Gameiro to illness last night as well as Costa but the team dug deep to overcome these difficulties," Atletico coach Diego Simeone told reporters.
Sevilla looked set for a fourth win in all competitions when Luis Muriel slid in to give them the lead against Getafe in the 72nd minute but the visitors levelled in the 93rd when Angel Rodriguez lashed into an empty net after Juan Cala, formerly of Sevilla, crashed into goalkeeper Sergio Rico.
Leganes celebrated their shock King's Cup win over Real Madrid in midweek by beating Espanyol 3-2 at home with the help of two own goals from visiting midfielder Mario Hermoso, who completed an unwanted hat-trick by scoring a late consolation strike for his side.