A brace from Lionel Messi on either side of an Antoine Griezmann goal canceled out Gabriel Paulista's opener, before Carlos Soler reduced the deficit with a peach of a strike.
It was turning out to be another disappointing night for the Catalans against Los Che, whom they hadn't beaten in their previous six games, following a lackluster first-half which ended goalless.
However, the home side lost the plot after the break, starting by conceding a penalty which Messi initially missed, but scored in the follow-up, before he converted a superb free-kick on the coattail of Greizmann's tap-in goal.
With the score now 3-1 in their favor, the game was effectively over, though Soler threatened to make a comeback with an unstoppable 30-yard pile-driver in the closing moments.
Barcelona managed to hold on for the remaining 10 minutes or so and kept their flailing title hopes alive with a nervy victory.
Here are the major talking points from the Mestella:
#1 Messi's free kick prowess a lot stronger than his penalties
It's one of football's great ironies that the world's best player can score some insane goals but somehow struggle with penalties, having missed another one tonight.
Even though Messi made up for it by knocking it in following mayhem inside the box which saw Valencia fail to clear their lines, it will still go down as a penalty miss from the Barcelona captain, the 29th of his career!
However, a few minutes later, he dispatched a sublime freekick, which albeit took a deflection off the upright before crashing into the bottom corner, demonstrating his prowess from set-pieces, which is clearly much better than his ability from 12 yards.
#2 Toni Lato's naivety allows Barca to come back into the game
Valencia defender Toni Lato conceded the penalty with a ridiculous handball that opened the doors for Barcelona to make a comeback. Even though Messi squandered the ensuing penalty with a limp effort which Cillessen saved, their failure to clear the danger allowed the Argentine to make up for the miss to tap in the equalizer.
It spurred Barcelona on as the visitors were laboring their way through the game until then, and only went on to build on that momentum thereafter, pushing more bodies forward and catching Valencia off guard with quick passes.
Indeed, the Catalans scored two more in the next 12 minutes, effectively ending the match as a contest.