Luis Suarez then set up a grandstand finish with a cool finish from the penalty spot.
The real trouble for Barcelona, however, came in defence.
Unheralded Ghanaian forward Emmanuel Boateng was the hero for home side as he doubled his tally of goals in Spain's top flight with a hat-trick.
Coutinho and Suarez came close to restoring parity for Barcelona but both players missed.
Valverde added: "When you look at the score, you assume Yerry Mina had a bad day".
But Messi will play no part in the match and stayed behind in Barcelona while his teammates travelled to Levante.
Two teams pulled off the feat in the 1930s when the competition only had 10 teams compared to 20 now.
Combined with their streak from last season, Barcelona went 43 matches unbeaten in La Liga; they hadn't lost a match since April 2017. But Barcelona couldn't score again despite a few opportunities and were handed their first defeat this season.
It was Barcelona's first defeat to Levante, and it proved to be a costly one in their pursuit of history.
But they fell just short in a match that nearly defied logic - they had only conceded 24 goals in their opening 36 games.
To round off a disappointing night for Barca, Belgian defender Thomas Vermaelen suffered an injury which must put his place at the World Cup in doubt.
However, Coutinho completed his own hat-trick with two goals in five minutes. He scored twice before former Liverpool playmaker Philippe Coutinho brought one back for Barca.
Argentina supporters may have been anxious their star man had picked up an injury with the World Cup just around the corner.
"We feel bad. Of course, we wanted to win the league first of all and after we did that we wanted to end the season unbeaten". Despite winning La Liga and the Copa del Rey, there have been some significant disappointments late in the campaign.
Elsewhere, Espanyol routed relegated Malaga 4-1.