A late goal from Sergio Leon meant Barca could only climb above Real Madrid into second, a point behind leaders Atletico Madrid, with two matches left to play.
Both Madrid sides will play their game in hand over the next couple of days.
Lionel Messi had earlier struck his 29th goal of the season to keep him at the top of the league goalscoring chart.
The Argentinian superstar opened the scoring with a fine volley after 25 minutes.
Jordi Alba sent in a dangerous cross from the left but Levante defender Jorge Miramon managed to get a touch.
However, Messi adjusted his body and executed a perfect left-footed volley to settle the visitors' nerves.
Alba almost added a second moments later when he latched onto Messi's ball over the top but he snatched at his volley and it flew wide.
But Barca doubled their lead in the 34th minute after Ousmane Dembele raced to the byline and pulled the ball back for Pedri to slide into an empty net.
The visitors almost had a third before half-time when Messi crossed for Sergio Busquets, whose header was narrowly wide.
Instead Barcelona were stunned when Levante scored twice in three minutes to haul themselves level.
First Miramon stood up a cross and Gonzalo Melero got in front of Sergi Roberto to head home at the far post.
Moments later Messi gave the ball away and Jose Morales played a one-two with Roger Marti before crashing the ball into the top corner.
Dembele struck with a fierce drive in the 64th minute to put Barca back in front.
But Leon left Barca on their knees when he turned in a cross from Tono with seven minutes remaining.
Atletico host Real Sociedad on Wednesday and Real travel to Granada 24 hours later.