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.
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.
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.
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.