Former Arsenal man Vela scored two goals in the first half before Mikel González and Gonzalo Castro finished the job in the second half for Sociedad.
Mexican international Vela's goals came in the 31st and 33rd minute.
Real Sociedad leapfrog Vallecano on goal difference into ninth place but just five points above the relegation zone with a record of five wins, six losses and one draw after 12 games.
Los Franjirojos have recorded five wins, six losses and one draw this season, which puts them down into 11th place after this thumping on the road.
The hosts pounded Vallecano with shots, attempting 26 during the match, with 10 on target.
Castro stood out in attack: the Uruguayan winger had six shots for Real Sociedad, more than any of his team-mates.
Vela completed 32 passes.
Rayo Vallecano had nine shots, including two on target.
The three attempts by Piti were the most of any Rayo Vallecano player.
The Rayistas had 51.6 per cent of the possession during the loss.
The combination of Roberto Trashorras to Piti was the most common during the match, as the two players connected 15 times.
- Sports & Recreation