Messi matches CR7's record in Barca win
Jose Barkero gave Levante the lead with a 23rd-minute penalty and Barca appeared to be making heavy weather of getting back on terms.
But Messi burst into life with two goals in nine minutes, the second a spot-kick of his own, to turn the game around.
Pedro's early cross-shot was beaten away by keeper Gustavo Munua and Thiago Alcantara should have done better than head Alexis Sanchez's cross wide from six yards.
Pedro Lopez made a vital block to prevent Thiago getting a shot away moments later and Munua fielded Adriano's ambitious effort.
The unmarked Thiago wasted another heading chance when he directed his flicked effort straight at Munua before Levante took a shock lead against the run of play.
After Barca failed to deal with a corner, Pedro Lopez headed straight at Sergio Busquets who was adjudged to have handled the ball. Busquets was booked before Barkero calmly tucked away the penalty.
Munua held Cesc Fabregas' downward header but Levante could have had a second in the 38th minute. Adriano collided with winger Valdo and, as both players crashed to the ground, full-back Pedro Lopez ran clear but dragged his shot wide. Referee Jose Antonio Teixeira, having played advantage, then booked Adriano.
The hosts had another chance on the break seven minutes after half-time when Arouna Kone broke away and found Barkero but his return pass was cleared by Carles Puyol.
Munua made an excellent diving save from Adriano but Javier Mascherano had to be alert at the other end after Roberto Botelho dribbled out of defence and almost sent the dangerous Kone through.
But after their impressive start to the second period, Levante were pegged back when the hitherto quiet Messi curled home a precise finish from the edge of the penalty area.
The Argentina star then sent a free-kick over the bar after being fouled by Vicente Iborra, but he was soon given his chance from the spot.
Botelho pushed substitute Isaac Cuenca to the ground in the box and Teixeira initially did not point to the spot, only to be convinced otherwise by his assistant.
Levante's lengthy protests, which may have been sparked more by the manner of arriving at the decision, saw full-back Juanfran booked before Messi powered an unstoppable penalty into the top right corner.
Levante threw Abdulkader Ghezzal on as a second striker but it was Barca substitute Andres Iniesta who was unlucky to be denied another penalty when he was impeded by Sergio Ballesteros.
Ghezzal headed over in stoppage time before Victor Valdes held former Barca player Xavi Torres' low long-range strike.