After 12 winless league games on the road, Sociedad ended that run thanks to Inigo Martinez's goal in the 66th minute.
The win lifted David Moyes' men into 10th, while13th-placed Getafe are only four points clear of the relegation zone after their loss.
The visitors had to wait until after the hour-mark for their goal, which came via Martinez.
Esteban Granero's set-piece from the right was headed in by Martinez, with the help of the post and diving Getafe goalkeeper Vicente Guaita.
Sociedad would hold on for their first competitive away victory since beating Aberdeen in UEFA Europa League qualifying in August last year.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.