The Catalan side were playing their first home game since the thrilling 6-1 comeback against Paris Saint-Germain in the UEFA Champions League but their performance evoked only a little of the magic of that night.
Valencia exposed their hosts' defensive frailties throughout the first half and Eliaquim Mangala gave Voro Gonzalez's side the lead after 29 minutes.
Fortunately for Barca, their superstar front three were on form and Neymar teed up Luis Suarez to equalise shortly before Mangala conceded a penalty and was sent off, Lionel Messi duly scoring from the spot.
Although Munir El Haddadi drew Valencia level almost immediately against his parent club, the 10 men struggled to contain Messi, who made it 3-2 after 52 minutes but will miss the trip to Granada in the first game back from the international break due to suspension after picking up a late yellow card.
The hosts pressed hard in search of a fourth throughout the closing stages, Neymar's dynamic solo run down the left flank leading to Andre Gomes's 90th-minute settler from close range, as Barca claimed a win that is vital to their title chances, moving them back to within two points of Madrid, who still hold a game in hand over the reigning champions.
In a determined start from the hosts, Suarez tormented Ezequiel Garay, turning his marker with a superb piece of skill before squaring to Messi, whose side-footed shot failed to beat Valencia goalkeeper Diego Alves with 15 minutes played.
The Argentina star hooked a shot over the crossbar moments later after a trademark mazy dribble but Barca lacked urgency and were punished for their slow start in the 29th minute.
After Munir missed a one-on-one with Marc-Andre ter Stegen, Daniel Parejo's corner was met by the head of Mangala, who did well to shake off the attentions of Ivan Rakitic and direct the ball into the corner of the net.
Barca were level six minutes later when Neymar's quick thinking in taking a fast throw-in put Suarez in behind Garay and the Uruguay star picked his spot, side-footing the ball past Alves and in at the far post.
Mangala was given his marching orders for pulling Suarez's shirt in the penalty area, his second booking in the space of five minutes, and Messi drilled the ensuing spot-kick low into the centre of the net to give Barcelona a 2-1 lead.
Undeterred by going a man down, Valencia went straight onto the attack, Jose Gaya bursting clear before squaring to Munir and the loanee was unchallenged as he calmly tucked inside the post to make it 2-2 at half-time.
Neymar had a shot saved by the leg of Alves after six minutes of the second half, but Valencia's goalkeeper was beaten at his near post one minute later when Messi burst into the box and scored with his weaker right foot.
Munir caught Barcelona flat-footed once again after 56 minutes but Gerard Pique raced back to make a last-ditch tackle and prevent him from shooting, while at the other end Suarez spurned the chance to make it 4-2, firing wide of an open net after Alves parried Messi's shot right into his path.
Neymar hit the outside of the post with a wonderful, curling free-kick after 76 minutes and the Brazil ace, who was chasing his 100th goal for the club, had to settle for a return to fitness after he missed Barca's previous game against Deportivo La Coruna.
With the game petering out and the visitors showing signs of fatigue, the scene was set for former Valencia player Gomes to score his first Barcelona goal and he did just that, stroking the ball home after Neymar's run and cross to make the final score 4-2.