The gap from first to second-placed Atletico Madrid is now nine points, while fourth-placed Real are 17 points off the summit, albeit with two games in hand.
Ousmane Dembele was back in the Barcelona XI for the first time since picking up a serious thigh injury in the middle of September, while Sergio Busquets's suspension saw Ivan Rakitic selected in midfield. There was also a spot at centre-back for Javier Mascherano as Gerard Pique started on the bench.
A bright start from the visitors saw Lerma fire over from a wide angle, while Boateng and Cheick Doukoure were causing problems with their pace and movement in the final third of the field.
The hosts should have doubled their lead through Luis Suarez in the 15th minute, but the striker fired straight at Levante goalkeeper Oier from close range as the pressure was cranked up.
Levante continued to cause problems on the counter, however, and Lerma had the freedom of the Barcelona box in the 16th minute - only to send his effort wide of the post from a very dangerous position.
Ivi was just flagged offside eight minutes later after more good work from Boateng, who had released his teammate through on the Barcelona goal.
Dembele then brought a smart save from Oier down the other end of the field, and the rebound was fired over by Luis Suarez as the score stayed 1-0 after an entertaining first 30 minutes of football at Camp Nou.
Messi sent a free kick over the Levante crossbar in the 32nd minute, but Barcelona had their second in the 38th minute when Luis Suarez found the top corner with a stunning finish after collecting a cross from Sergi Roberto.
Rakitic and Messi had opportunities to add to the scoring late in the first period, but the former saw his powerful strike just miss the post, before the latter was kept out by Oier from close range.
Ivi came close to halving the deficit early in the second period as he unleashed a powerful strike from the edge of the Barcelona box, but Marc-Andre ter Stegen was on hand to make a smart save.
It took Barcelona until just before the hour to fashion a half-chance in the second period, but Dembele's strike from distance was always rising over the Levante crossbar.
The visitors again came close in the 64th minute when Jason fed American defender Shaquell Moore inside the Barcelona box, but Ter Stegen made another smart save.
Luis Suarez fired straight at Oier in the 72nd minute as Barcelona chased a third goal, but Levante, who stay down in 16th spot in the table, were holding firm at the back.
It did appear that just two goals would separate the two teams on the afternoon, but Barcelona netted their third in the 93rd minute when Paulinho tapped a low Messi cross into the back of the net.
BARCELONA (4-3-3): Ter Stegen; Roberto (Arnaiz 85'), Mascherano, Vermaelen, Alba; Rakitic, Paulinho, Iniesta (Gomes 76'); Dembele (Semedo 67'), Suarez, Messi
LEVANTE (4-2-3-1): Oier; Moore, Postigo, Cabaco, Luna; Lerma (Rober 62'), Lukic; Jason (Garcia 83'), Doukoure, Ivi; Boateng (Mesa 74')