Lass Bangoura and Piti, with a penalty, put Rayo two goals up in the second half and they held on despite Bilbao pulling one back through Mikel San Jose near the end and a late red card for visiting defender Alejandro Galvez.
Rayo, who are in administration and operate on La Liga's smallest budget, climbed to 31 points, the same as Real Betis in fifth and Malaga, after a fourth straight win.
Last season's Europa League and Copa del Rey finalists Bilbao were 14th with 21 points after a third consecutive defeat.
Rayo struck first just after half-time when Guinean forward Lass burst through a huge gap in Bilbao's shambolic defence and fired past Gorka Iraizoz in a one-on-one.
Bilbao coach Marcelo Bielsa threw on want-away striker Fernando Llorente who headed against the bar with almost his first touch, but the hosts were again hit on the break.
Alejandro Dominguez was brought down just outside the area, though the linesman signalled it had been inside, and a penalty was awarded.
Rayo captain Piti scored from the spot in the 65th, but they were slowly pushed back and defender San Jose volleyed one back for Bilbao, as the visitors struggled to clear a freekick in the 77th.
Llorente headed wide from point-blank range in a frantic finale, when Rayo were reduced to 10 men after Galvez picked up a second yellow card.
Rayo Vallecano had the ball for 41.6% of the match.
Franjirojos had 12 shots, including six on target.
Rubén Martínez pitched in with six stops.
Piti had three shots for Rayo Vallecano, more than any of his team-mates.
Athletic Bilbao actually came out on top in terms of ball possession, posting a 58.4% possession rate during the contest.
Los Rojiblancos's players linked up for 278 passes and 22 crosses in defeat.
Fernando Llorente made his mark on the match for Athletic Bilbao after coming on for Iker Muniain in the 59th minute, as he took three shots.
The four attempts by Aritz Aduriz were the most of any Athletic Bilbao player.
- Sports & Recreation