Barcelona was playing without Lionel Messi, left out of the squad by Ernesto Valverde to rest ahead of a demanding summer for the Argentina forward at the World Cup.
Led by Emmanuel Boateng’s hat trick and two more goals from Enis Bardhi, Levante was heading toward a historic rout of the recently crowned champions when the hosts built a 5-1 lead after 56 minutes.
But Barcelona roared back, with Philippe Coutinho adding two more goals to his first-half strike to complete a hat trick before Luis Suarez converted a penalty to cut the deficit to 5-4 in the 71st.
Suarez headed high from close range in Barcelona’s last chance to snatch the draw.
The upset at the hands of a modest Levante side — fighting to stay out of the relegation zone most of the season — ended Barcelona’s bid to go all 38 rounds of a La Liga season undefeated.