Ryan made a total of six saves including an amazing triple save in the 55th minute that proved instrumental in setting up Valencia's first goal of the match.
It was a rough start for Ryan and Valencia as Rayo took a 15th-minute lead through Jozabed with a brilliant volley that the former Central Coast Mariners stopper could do little about.
Early in the second half Alvaro Negredo scored a stunning goal from 40 meters off the back of Ryan's triple save to give Valencia an equaliser they barely deserved, only for Diego Llorente to restore Rayo's lead on 69 minutes.
Again, Ryan could not be faulted for Rayo's second goal as an unmarked Llotente rocketed a half-volley into the top corner of a low-hit corner.
Valencia's frustrations then reached boiling point when Alcacer had what looked to be a legitimate goal ruled offside, but the striker netted again with 88 minutes gone to avoid what would have been a disastrous result for Valencia and England coach Neville, with the home supporters greeting both the half-time and full-time whistles with more whistling of their own.
Neville's side sit 10th in the Primera Division table after 20 games, 16 points behind the final Champions League spot, and have not won a game since November 7 when they thrashed Celta 5-1. Rayo's last victory came that same day, against Granada, and the Vallecas club are in the midst of their worst run since 2003, when they were relegated, and they remain in the drop zone.
Neville dropped goalkeeper Jaume Domenech in place of Ryan and removed Aymen Abdennour from the squad altogether after poor showings against Real Madrid and Real Sociedad, but recalled Negredo.
Valencia thrashed Granada 3-0 in the Copa del Rey on Thursday to seal a 7-0 aggregate win and book their place in the quarter-finals, and before the game Neville talked about the importance of translating the team's form in the cup to the league.
But Rayo were much more alert than their bedraggled hosts from the start and with just two minutes gone left-back Nacho volleyed at goal and forced a corner. Just moments later Venezuelan striker Miku headed a cross from Jozabed against the crossbar and Valencia looked more and more nervous, and it was little surprise that they fell behind on 15 minutes.
Adrian Embarba got down the right and crossed towards Jozabed, who swivelled to shoot first time into the far corner.
By the end of the first half the hosts had managed just three shots to Rayo's eight, barely troubling goalkeeper Juan Carlos, and they were booed off the pitch by the Valencia fans, who also chanted "We've had enough."
There was little improvement at the start of the second half, and Miku missed a glaring chance to double Rayo's lead, shooting wide of the far post from close range. The boos grew louder and Rayo attacked again, Ryan forced to make three successive saves from Roberto Trashorras and Jozabed before the defence eventually cleared. Negredo controlled a long ball just ahead of the centre-circle and spotted Juan Carlos off his line, producing a brilliant lob over the goalkeeper to score one of the goals of the season.
It sparked a revival and minutes later Negredo held the ball up to play in Rodrigo Moreno down the right, but Juan Carlos got across to parry the effort.
Valencia were unable to keep the momentum up and conceded again in the 69th minute. No one tracked Llorente from a corner and the defender was able to shoot unchallenged into the roof of the net.
Alcacer had replaced Negredo a few minutes earlier and looked to have levelled when he stroked Rodrigo's pass into the far corner, but it was wrongly chalked off. He got the goal he deserved though two minutes before the end, appearing at the far post to slide Zakaria Bakkali's low pass into the net.