After a shock home defeat to Granada in midweek, Ronald Koeman's side simply had to win at the Mestalla. Despite Valencia's lowly league position, they came into the match unbeaten in eight at home, so it was never going to be easy for Barcelona.
And so it proved when Gabriel Paulista put the hosts ahead early in the second half. However, Lionel Messi scored either side of an Antoine Griezmann goal to turn the game on its head.
Carlos Soler's superb late strike set up a tense finale, but Valencia could not find an equaliser and Barcelona kept the pressure on league leaders Atletico Madrid ahead of the huge clash between the two teams at the Nou Camp next weekend.
Elsewhere in Spain, Villarreal warmed up for the second leg of their Europa League semi-final against Arsenal on Thursday with a 1-0 home win against Getafe in LaLiga, with Yeremi Pino on target after 79 minutes.
Unai Emery's side climbed up to sixth place above Real Betis, who drew 1-1 at Real Valladolid.
Granada, meanwhile, lost 1-0 at home to Cadiz.
Inter Milan clinched the Serie A title after Atalanta could only draw at Sassuolo on Sunday.
Inter, 2-0 winners at Crotone on Saturday, have held a commanding lead over the chasing pack for some time and have now been crowned champions of Italy for the first time since 2010, ending Juventus' nine years of dominance.
Atalanta overcame an early red card for goalkeeper Pierluigi Gollini by taking the lead through Robin Gosens after 32 minutes. Domenico Berardi equalised from the penalty spot at the start of the second half before Marlon Santos was sent off for the hosts.
It remained 1-1, leaving Inter 13 points clear at the top of the table with just four matches left to play.
Antonio Conte's side snatched top sot from city rivals AC Milan on February 14 and have stayed there ever since, running away with the title in the end.
It is Conte's fourth Serie A title after winning the league three times with Juventus in 2012, 2013 and 2014.
Napoli dropped points in the race for the Champions League places as they drew 1-1 with struggling Cagliari, while Lazio gave their hopes of a top-four finish a boost with a 4-3 home success against Genoa.
There were also plenty of goals at the Stadio Renato Dall'Ara, where Bologna and Fiorentina shared the points in a 3-3 draw.
Dethroned champions Juventus needed two late goals from Cristiano Ronaldo, the first from the penalty spot, to win 2-1 at Udinese, who had led courtesy of Nahuel Molina's 10th-minute strike. Juve are third in the table, level on points with second-placed Atalanta,
Goals from Adrien Silva and Jakub Jankto gave Sampdoria a 2-0 victory against Roma.
The big game in Ligue 1 saw Monaco's title aspirations dented by a 3-2 home defeat to Lyon, who are now just one point behind their opponents in the race for the Champions League places.
Kevin Volland struck to give the hosts the half-time lead, but Memphis Depay equalised early in the second half, before Maxence Caqueret was sent off.
Despite being a man down, Lyon led again through Marcelo's goal. Wissam Ben Yedder's 86th-minute penalty looked like rescuing a draw for Monaco, but Rayan Cherki netted a last-minute winner.
Tempers flared at the end as Pietro Pellegri and Willem Geubbels were shown red cards for Monaco, while Lyon pair Marcelo and Mattia De Sciglio were also sent off.
Rennes's hopes of finishing fifth in Ligue 1 were dealt a blow with a 1-0 defeat at Bordeaux, while Nantes gave their survival hopes a boost with a 4-1 win at Brest, and Nimes remain in relegation trouble after a 2-2 home draw with Reims.
Relegated Dijon's misery continued with a 5-1 defeat at home to Metz, goals from Yoane Wissa and Fabien Lemoine saw Lorient win 2-0 against Angers as both teams finished the match with 10 men, and Saint-Etienne came from behind to win 2-1 at Montpellier.