The Basques had not won on the road in 12 matches until Monday, when Inigo Martinez headed in the only goal of the game
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, while 13th-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.
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 third league win in four matches, a result which means they have now climbed five places in the table since Moyes' arrival in November.