Barca coach Ernesto Valverde again rotated his starting 11 for the game and Messi spent the first 45 minutes watching from the sidelines. Barca controlled the first half with Luis Suarez and Philippe Coutinho testing Levante keeper Aitor Fernandez, who was his side's best player in the opening 45 minutes.
Despite Barca's dominance, they were unable to open the scoring and Messi replaced Coutinho at the start of the second half to try and find a way through.
He was on target for the 34th time in the league this season in the 62nd minute as he fired home a left foot shot following a headed pass from Arturo Vidal.
Barca have won 26 league titles in Spain, compared to 33 for Real Madrid. But Barca have won eight of the last 11 leagues and 10 of the last 15 (all 10 with Messi in the squad).
Earlier in the day, second-placed Atletico Madrid won 1-0 at home over struggling Valladolid to delay Barca's celebrations.
The only goal of the match came in the 66th minute when Valladolid's Joaquin Fernandez put the ball into his own net, but the visitors were convinced they should have had a penalty after Santiago Arias clearly handed the ball in his own area.
Referee Melero Lopez checked with the VAR but decided the handball was accidental.
Athletic Club Bilbao remain seventh after a 1-1 draw at home with Alaves in the Basque derby.
Benat opened the scoring for the home side with a spectacular 41st minute free kick, but Borja Baston equalized four minutes later in a game in which both teams looked flat in their third game in seven days.
Leganes and Celta Vigo drew 0-0, which draws Celta a point closer to survival and means they remain unbeaten since Iago Aspas returned to the side after injury.