Late goals from Alvaro Negredo and Denis Cheryshev earned Gary Neville his first Primera Division win as Valencia coach but Espanyol came close to inflicting a fatal blow.
Oscar Duarte's 52nd-minute header gave the struggling Catalans the lead and looked set to condemn Neville to a third consecutive league defeat which would have left his side just two points above the relegation zone.
But substitute Negredo pulled them level with a deflected finish after 70 minutes and new recruit Cheryshev scored with a diving header six minutes later to give Valencia the lead for the first time in 10 league games under Neville.
Although the remaining quarter of an hour witnessed a couple of nervy moments for the hosts, they hung on to claim their first league victory since beating Celta Vigo 5-1 on 7 November .
Neville's side climb from 15th to 11th in the table thanks to the 2-1 win, while Espanyol lie just one point above the drop zone.
Cristiano Ronaldo scored twice as Real Madrid kept up the pressure on title rivals Barcelona and Atletico Madrid with a 4-2 victory over Athletic Bilbao.
Ronaldo gave the Merengues a dream start by netting a stunning goal inside three minutes but Javier Eraso levelled in the 10th minute after pouncing on an error by Raphael Varane, who was sent off late in the game for picking up two bookings.
James Rodriguez put the hosts ahead again with a curled finish after 37 minutes and Toni Kroos added to the lead on the stroke of half-time.
Ronaldo notched his second goal in the closing minutes, before Gorka Elustondo got a consolation for Athletic.
A fourth consecutive home win under Zinedine Zidane lifted Real up to second - two points ahead of Atletico and one behind Barcelona, who are both in action on Sunday.
Villarreal's top-four hopes remain on track after Roberto Soldado's early goal earned them a 1-0 win over Malaga.
The former Tottenham striker scored the game's only goal after 18 minutes, firing into the bottom corner from the edge of the area after a one-two with Leo Baptistao.
Although they only managed one goal, Marcelino's men were utterly dominant and worthy of a win that extended their unbeaten run in the league to 11 games.
In the late game, Deportivo La Coruna and Real Betis drew 2-2.