Kevin Gameiro struck the opener for the visitors, before Daniel Parejo doubled their lead from the penalty spot.
Messi scored his first from the spot, with his second a curler from the edge of the box in the 64th minute.
He suffered a knock to his right thigh soon afterwards but is expected to be fit for Wednesday’s Copa del Rey semi-final first leg against Real Madrid.
“I imagine that he can’t be too bad,” said Valverde. “We’ll wait to see what the doctors say, then evaluate things based on that.”
Atletico Madrid face Real Betis on Sunday, bidding to close the gap with leaders Barcelona to three points.
Valencia flew out of the blocks, as Marc-Andre Ter Stegen was forced into an early save from Parejo before Denis Cheryshev rattled the far post with a low drive.
In the first contentious decision of the evening, Barcelona had an early penalty appeal waved away after Nelson Semedo’s shot appeared to be blocked by the arm of former Arsenal defender Gabriel Paulista.
Then came Gameiro’s opener, struck beyond Ter Stegen after a searching run and through ball from Rodrigo Moreno on the counter-attack when Messi was dispossessed in a collision that could have been deemed a foul.
Sergi Roberto naively pushed Daniel Wass in the area, and Parejo converted from the spot for Valencia’s second. Barcelona had reason to feel aggrieved, with defender Gerard Pique off the field as he received treatment for a head injury.
Barcelona got back into the game with a Messi penalty as he scored for the eighth La Liga match in a row.
It was a fairly soft penalty award, although VAR agreed with referee Alberto Undiano Mallenco’s decision to award the spot-kick as there was some contact on Semedo.
Barcelona peppered Neto’s goal, but Valencia were just as dangerous, forcing Ter Stegen into a couple of important saves.
Space was at a premium in the Valencia area as they tried to hold out for the win but Messi found enough to turn and curl a stunning effort past a helpless Neto to earn a point for the Spanish champions.