Barcelona lost at home in the league for the first time since April 2012 as Valencia ended the league leaders’ run of 25 successive wins at the Nou Camp.
Alexis Sanchez gave Barca the lead before Dani Parejo swept home and Pablo Piatti headed in for the visitors.
Lionel Messi made it 2-2 from the penalty spot after Ricardo Costa had handled, but Valencia grabbed a famous win when Paco Alcacer slotted in.
The La Liga champions were also reduced to 10 men when Jordi Alba was sent off.
The former Valencia player was dismissed for a body-check on Sofiane Feghouli 13 minutes from time.
Defeat was Barcelona’s first at home in the league since a 2-1 loss to Real Madrid in April 2012.
Barcelona remain top of the table on goal difference with 54 points, from Atletico Madrid, who play Real Sociedad on Sunday at 1800 GMT.
Real Madrid, who have won their last five league matches, are a point behind and are at Athletic Bilbao on Sunday (2000 GMT).