Messi's strike saw Barca return to the top of the standings with 31 points after 14 games, ahead of Real Madrid on goal difference, while Atletico were left in sixth spot on 25 points, having played one match more than the two pacesetters.
Unbeaten Real are a point ahead of promoted Granada and Atletico Madrid after Diego Simeone's side failed to break down their well-drilled local rivals.
Real Madrid climbed to the top of the standings with 14 points from six games, one point and one place ahead of Atletico Madrid, whom they face on Saturday in the derby at the Wanda Metropolitano.
The Argentinian playmaker's withdrawal will be a major concern for Barca, particularly given this was Messi's first start of the season after just recovering from a niggling calf injury sustained at the start of August.
Barca won a penalty early in the second half when Luis Suarez was fouled and Messi converted to put the league leaders in front and the Uruguayan forward made sure of the points with a simple finish from close range in the 82nd minute.
Atletico Madrid took a huge advantage in their heavyweight Champions League last-16 tie with Juventus, earning a 2-0 home win.
Messi scored Barcelona's second goal against SD Eibar shortly after halftime to reach a milestone in the competition after 435 league matches.
The UEFA Champions League round of 16 will see three England-Germany clashes and a true test of the Premier League v Bundesliga.
Real Madrid were playing their first competitive game since all-time top scorer Cristiano Ronaldo left and Julen Lopetegui succeeded Zinedine Zidane as coach.
The first leg of the semifinals will be played on April 24 and 25, with the return games on May 1 and 2.
Barcelona's 100 percent start to the Liga season will be severely tested at Atletico Madrid in an atmosphere certain to be intensified by political fervour.
Real's 3-0 win in the first leg proved too much for Atletico Madird to overcome as the reigning European champions progressed 4-2 on aggregate.
Subscribe to our Youtube channel for all latest in-depth, on the ground reporting from around the world.
Copyright © 2020 TRT World.