Atletico Madrid are now level on 76 points with Barca at the top of La Liga with five games remaining as they beat Granada 3-0, but the Catalans retain the lead thanks to their superior head-to-head record.
Third-placed Real Madrid are also only a point behind thanks to their 5-1 win at Getafe on Saturday.
Valencia were beaten 7-0 by Barca on their last trip to the Camp Nou just two months ago under former boss Gary Neville, but gained revenge thanks to Ivan Rakitic's own goal and Santi Mina's classy finish before half-time.
Messi ended a five-game goal drought to bring up his 500th for club and country, but couldn't inspire a Barca fightback as their alarming collapse in recent weeks continued after a 39-game unbeaten run.
Having looked well set for a second consecutive treble just two weeks ago, Barca could now miss out on all three major trophies as they were dumped out of the Champions League by Atletico in midweek and have taken just one point from their last four La Liga games.
However, in contrast to recent defeats, Barca boss Luis Enrique praised the performance of his side and believes they are capable of winning their last five games to retain the title.
"Luck didn't shine on the team. I congratulate my players for how they faced the adversity during the game," said Enrique.
"We still depend on ourselves. Our margin for error has run out and we are aware of the challenge. Now we have a marvellous challenge, five games in which if we win them all we are champions."
Barca started brightly, but were repeatedly denied by fine saves from Valencia goalkeeper Diego Alves. The Brazilian blocked Messi's volley from close range before somehow springing to punch away Neymar's lob which seemed destined to evade him.
However, Valencia amazingly went in at half-time two goals to the good having had just one shot on target. The visitors went in front on 27 minutes when Rakitic turned Guilherme Siqueira's cross into his own net at the near post and doubled their lead thanks to a brilliant move in first-half stoppage time as Dani Parejo played in Mina to fire into the far corner.

Latest News from Sports News Desk