Sustained first-half pressure by a dominant Sociedad told when Vela hit the back of the net in the 31st minute after pouncing on a loose ball in the six-yard box.
Two minutes later, the 23-year-old Mexico striker hit his fifth goal of the season with a skillfully struck right-footed shot from outside the area.
“The most important thing for us is team cohesion, not individual play, and today has been a good match for us,” said Vela. “Playing at home always gives us an extra edge.”
Mikel Gonzalez slotted home Sociedad's third in the 61st before Gonzalo Castro added another in the 77th minute.
Sociedad rises to ninth place in the standings on 16 points, the same as Rayo, which is 11th in the standings.
Sociedad midfielders Asier Illarramendi and Ruben Pardo were dominant, leaving Rayo looking ragged and unable to string passes together.
From Our Network
- Ayaz Promised He Wouldn't Speed, Says Azhar's Friend Jwala Gutta
- Watch: 'You're not happy India won', captain cool Dhoni fumes at journalist
- IPL 8: Glenn Maxwell has disappointed himself: George Bailey
- Sachin Tendulkar prays for flood victims, says Chennai is fighting back
- Ahmed Shehzad acted like Afridi's servant: Former PCB chief
- Why doesn’t farmers’ suicide trouble you as much as Pratyusha’s, asks Nana Patekar
- 'Find Your Beautiful': Radhika Apte explains real meaning of beauty
- Actor Harshvardhan Rane finds it challenging to romance three heroines in 'Maaya'
- Shah Rukh Khan is really impressed with his 'Raees' co-stars
- Kapil Sharma returns tonight: 5 reasons that make the first episode special