Quique Setien suffered his first defeat as Barcelona manager as Valencia claimed their first home win over the Spanish champions since 2007.
The hosts broke the deadlock when Jordi Alba deflected Maxi Gomez’s powerful strike past Marc-Andre ter Stegen.
Gomez, who had a first-half penalty saved by Ter Stegen, completed the scoring in the second half.
There were unsavoury scenes before the game as rival fans clashed outside the Mestalla Stadium.
Setien had enjoyed a good start to his Barca reign, guiding the club to victories over Granada in La Liga and UD Ibiza in the Copa del Rey round of 32.
The visitors were quick to gain a stranglehold on possession but were almost non-existent as an attacking force in the first half, with Valencia enjoying the better of the early chances.
Los Che were gifted a golden opportunity to take the lead when Gerard Pique felled Gomez inside the penalty area, but the Uruguayan’s spot-kick was superbly palmed to safety by Ter Stegen.
The former Borussia Monchengladbach goalkeeper had to be on his toes moments later to parry another Gomez effort on to the woodwork, before tipping Kevin Gameiro’s follow-up past the post at full stretch.
Barcelona started the second half with greater purpose and Ansu Fati almost fashioned an opening after combining well with Lionel Messi, but the teenager could only poke his shot wide of Jaume Domenech’s right-hand post.
Messi appeared eager to take matters into his own hands as the second half progressed, dragging a fierce low effort wide of the far post before heading off target from Antoine Griezmann’s delivery.
Gomez ended the visitors’ hopes of a late revival with 13 minutes remaining, curling into the far corner after Ferran Torres had broken clear down the right wing.
Former Arsenal defender Gabriel Paulista thought he had made it 3-0 late on, but the Brazilian’s volley was disallowed for an infringement inside the Barcelona box.
Second-placed Real Madrid can move three points clear of Barcelona at the top of La Liga if they win their game in hand at Real Valladolid on Sunday.