Luis Enrique’s men went into the game with a poor record against Real Sociedad at the Stadio Anoeta and that continued on Sunday night after a stunning performance from the home side.
Sociedad midfielder Xabi Prieto had two chances to score inside three minutes but the club favourite could only head wide on both occasions.
Former Arsenal man Carlos Vela was then the next man to go close but he could only miss the target with a left-footed volley.
Barcelona had to wait until the 41st minute for their first meaningful effort but Luis Suarez saw his shot go wide of the target.
The home side continued to push forward at the start of the second-half and they got their reward when Willian Jose scored in the 53rd minute. Vela saw his effort blocked but Willian Jose just did enough with his header.
Sociedad’s lead did not even last 10 minutes as Neymar turned provider for Messi just before the hours mark. The Brazilian charged down the left and cut the ball back for Messi who drilled his ball into the bottom corner.
Juanmi came off the bench and should have celebrated a goal but he was ruled offside following Vela’s shot, a decision that turned out to be incorrect.
Barcelona continued to struggle and Vela had one last chance before full-time but his curling shot bounced off the post and out for a goal-kick.
Enrique’s men must now go back to the drawing board ahead of next weekend’s El Clasico clash against rivals Real.