Barca dropped points against Cadiz on Sunday but three second-half goals eased them past Elche to move them within five points of league leaders Atletico Madrid.
Messi opened the scoring after a fine flick from Martin Braithwaite before scoring his 18th goal of the campaign following a surging run from Frenkie de Jong. Jordi Alba added the third, turning home Braithwaite's knockdown from a Messi cross.
Barca are hanging in the title race. They've played a game more than Atletico but they're within five points now -- as close as they've been in 2021 -- and Diego Simeone's side have started to drop points. It's still a long shot but, as coach Ronald Koeman said on Tuesday, "while there's still hope, we have to keep fighting."
In Messi, they still have the league's most outstanding player. Despite the doubts about his long-term future, the 33-year-old keeps delivering. He's scored 10 times in his last six La Liga appearances and remains the team's main creator, too.
There were shades of Sunday, when Barca drew 1-1 with Cadiz, in the first half here. Barca attempted only two shots in the opening 45 minutes, looked slow, and were devoid of ideas. It wasn't a performance of champions.
And while the scoreline was comfortable in the end, it didn't have the feel of a particularly fluid performance, with individual moments of brilliance from Messi, Braithwaite, and De Jong opening the game up. It could have been a different story, mind, if Elche's Lucas Boye had taken the two chances that fell his way in the first half.
Manager rating out of 10
6 -- Koeman's decision to make five changes backfired but he rectified it in the second half, with the introduction of Ousmane Dembele and a formation tweak that reaped immediate results. Sergio Busquets also added structure off the bench.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
GK Marc-Andre ter Stegen, 6 -- Had little to do with Boye sending Elche's best chance over and their second straight at the German goalkeeper.
DF Oscar Mingueza, 6 -- Solid in defence but lacking accuracy with his crossing in the final third.
DF Gerard Pique, 6 -- The accumulation of minutes after three months out has been the most important thing for the Barca defender over the last week.
DF Samuel Umtiti, 6 -- Didn't make any mistakes and was fine on the ball but was lacking confidence after recent errors.
DF Jordi Alba, 6 -- Got forward to score Barca's third goal, his fourth of a productive campaign.
MF Frenkie de Jong, 7 -- Produced a brilliant, driving run through the heart of the Elche defence to set up Messi's second goal.
MF Pedri, 7 -- Caught the eye at first this season for his ability on the ball but it's his role off of it that's becoming more important. Wins back so many balls and presses so diligently.
FW Francisco Trincao, 7 -- Did brilliantly in the first half up until the point of taking his chances. Had two good opportunities to score but wasted them both, shooting at Edgar Badia.
FW Lionel Messi, 9 -- Took both his goals well and played a lovely pass to create Alba's effort, too.
FW Martin Braithwaite, 7 -- Anonymous on the left in the first half but improved through the middle after the break. His assist for Messi was great and he made the right decision to set Alba up when others may have been tempted to go for goal.
FW Ousmane Dembele, 6 -- Didn't have his best night but his presence changed Barca's shape for the better and, subsequently, the game.
MF Sergio Busquets, 6 -- Came on at 1-0 to add structure to Barca's side and within minutes the game was wrapped up.
DF Sergino Dest, N/R -- Used at left-back to give Alba a break.
FW Antoine Griezmann, N/R -- Was only on for 15 minutes but missed two good chances, although they may both have been ruled out for offside anyway.
DF Clement Lenglet, N/R -- Replaced Pique late on.