Lionel Messi scored twice as Barcelona beat Valencia to stay in the four-team Spanish title race, but they made it difficult for themselves by going behind in the second half and missing a penalty.
Ronald Koeman was banned from the touchline after showing dissent in the last game against Granada, and was a frustrated spectator in the first period with Valencia playing five across the back and smothering Messi in a crowd of white shirts.
Barcelona’s best chance fell to Ronald Araujo who got on the end of a Messi set-piece but he had his shot saved at point-blank range by Jasper Cillessen.
Former Arsenal defender Gabriel Paulista (No 5) opened the scoring for the hosts with a header five minutes after the interval
Talismanic Barcelona forward Lionel Messi (centre) then poked home from close range to equalise just after missing a penalty
Messi had several free-kicks that sailed over the Valencia bar and Jordi Alba ran in behind the home team’s defence on several occasions but balls flashed across the six-yard box without anyone getting on the end of them.
The second half was a different story with Valencia scoring first and chaos ensuing – chaos which seemed to suit Barcelona far more than Valencia.
It was former Arsenal centre-back Gabriel Paulista who headed his team in front on 50 minutes. A corner from the left sailed over Marc Andre ter-Stegen, who went down in a heap after getting tangled up with Thierry Correia.
Messi’s strike partner Antoine Griezmann (left) then gave his side the lead six minutes later with a close-range left-foot finish
The Argentine then extended the visitors’ lead with a sumptuous free-kick in off the post and past goalkeeper Jasper Cillessen
Gabriel powered in front of Clement Lenglet to head into the empty net and for all that Barcelona players protested replays showed their keeper had not been fouled.
Barcelona were potentially in trouble now. If it had been impossible to break down a Valencia defence sat deep and in numbers it would get no easier now that they were behind.
They were literally handed a lifeline when Toni Lato handled to stop a pass reaching Frenkie de Jong and referee Jose Maria Sanchez pointed to the spot. Cillessen saved Messi’s penalty but Pedri was quick to the rebound and when Gabriel saved his shot on the line the ball came out to Messi who buried it for 1-1.
Valencia midfielder Carlos Soler (left) made it interesting with a wonderful 35-yard shot but Barcelona held out to win 3-2
Barcelona manager Ronald Koeman (left) saw his side keep their LaLiga title hopes alive with a fine 3-2 win against Valencia
That was his 27th goal of the season and goal number 28 was not far behind. After Antoine Griezmann made it 2-1 with a close range-shot Messi, having failed to beat former Barcelona team mate Cillessen from the penalty spot, sent a free-kick from the area fizzing past him to make it 3-1 on 62 minutes.
Barcelona were in control now but this fixture rarely disappoints and Valencia, underwhelming all season, would not lie down. Carlos Soler scored the goal of the game from distance with a shot that left Ter Stegen with no chance and made for a nervy last seven minutes.
This time Barcelona held out and they go back on level points with second-placed Real Madrid, two points behind leaders Atletico Madrid. Ronald Koeman had told his players before the game – win all your games and you will win the league. They need others to slip up but they kept up their side of the bargain at Mestalla.
Match Facts: Valencia and Barcelona in key La Liga tie
Valencia (4-4-2): Cillessen; Correia, Gabriel, Guillamon (Gameiro 79), Gaya; Wass, Racic (Oliva 79), Soler, Lato (Diakhaby 64); Gomez, Guedes.
Subs not used: Domenech, Mangala, Ferro, Blanco, Cheryshev, Kang-In, Vallejo, Piccini, Musah.
Goals: Gabriel 50, Soler 83.
Yellow cards: Racic 35, Lato 56.
Manager: Javi Gracia.
Barcelona (3-5-2): Ter Stegen; Araujo, Pique, Lenglet; Dest (Roberto 75), De Jong, Busquets, Pedri (Moriba 75), Alba; Griezmann, Messi.
Subs not used: Neto, Pjanic, Dembele, Puig, Trincao, Fernandes, Umtiti, Firpo, Mingueza, Urena.
Goals: Messi 57, 69, Griezmann 63.
Yellow cards: Ter Stegen 65.
Manager: Ronald Koeman.