The victory at a chilly Estadio de Vallecas lifted Rayo above Valencia and Real Sociedad into seventh and they are two points behind sixth-placed Levante, who occupy the second of Spain's two Europa League berths.
Lass Bangoura fired Rayo ahead in the 14th minute when he played the ball into space and nipped between two defenders before crashing an angled shot into the roof of the net.
Piti made it 2-0 14 minutes later with a fine left-foot volley across Getafe goalkeeper Miguel Angel Moya and found the net again seven minutes into the second half when he slammed home a Leo Baptistao centre.
Getafe's 19-year-old forward Paco Alcacer pulled a goal back for the visitors in the 65th minute but their chances were effectively snuffed out seven minutes later when midfielder Michel was shown a straight red after clashing with Baptistao.
Unbeaten leaders Barcelona extended their advantage over second-placed Atletico Madrid to 11 points when they thrashed Espanyol 4-0 on Sunday.
Atletico were held to a 1-1 draw at Real Mallorca and Real Madrid closed to within five points of their city rivals thanks to a 4-3 victory at home to Real Sociedad.
Rayo Vallecano enjoyed possession for 57.4% of the match.
The Rayistas had 24 shots, including 12 on target.
Getafe had the ball for 42.6% of the loss.
Getafe had 11 shots, including four on target.
Paco Alcácer made the biggest impact of any Getafe substitute after coming on for Jaime Gavilán in the 61st minute, as he scored one goal.
Ángel Lafita had three shots for Azulones, more than any of his team-mates.
- Sports & Recreation
- Real Sociedad