
Messi scored two goals in the first half and then set up Francisco Alcacer for another before half-time, just after Samuel Umtiti had scored an own-goal for Sociedad.
Sociedad's Xabier Prieto scored another right after that as the first half incredibly ended 3-2 with three goals in the last two minutes, and the second half produced no further goals as the home side held on for three points.
The result keeps Luis Enrique’s side three points behind leaders Real Madrid, who beat Sporting Gijon 3-2 earlier on Saturday and have a game in hand.