The Argentina star scored his 19th goal of the season just before the hour mark to cancel out Willian Jose's header, but a largely poor performance from the champion meant its nine-year wait for a win at Anoeta goes on.
Barca had lost its last four league visits to San Sebastian and that record looked to be working on the players' minds in a nervous and deeply disjointed first-half display, in which they failed to register a shot until the 41st minute.
Sociedad had been by far the better side and was good value for the lead when the breakthrough came shortly after half-time, with Willian Jose's effort being sliced into his own goal by Gerard Pique as he covered the goal line.
Messi responded soon afterwards after good work from Neymar, but a winner for the visitor never looked likely and Carlos Vela crashed an effort off the underside of the crossbar from 20 yards before Juanmi's rebound was unjustly ruled out for the host.
Denis Suarez had a shot blocked and Javier Mascherano steered a header narrowly wide, before Vela clipped the base of the post with another effort that had Marc-Andre ter Stegen beaten.
Ultimately there was to be no winner, however, meaning Sociedad missed out on the chance to move above Atletico Madrid into fourth, while Barca could only close to within six points of league leader Real Madrid.
Barca certainly looked like a side feeling the pressure of its poor run at Anoeta, with a sliced clearance from Pique and a subsequent mix-up between Mascherano and Ter Stegen underlining its nervousness early on.
Xabi Prieto's downward header forced a strong stop from Ter Stegen as Sociedad continued to look the more threatening, and a poor first touch from Vela - in behind a static Barca defence - saw another good chance go begging.
Barca's front three looked completely isolated during a dismal first half for the visitor, during which it registered no shots on target, no corners, no crosses from open play and only 47 per cent of the possession.
Neymar saw a free-kick pushed around the post by Geronimo Rulli shortly after the break, but, just as Barca looked like mustering some improvement, it went a goal behind.
Vela's persistence forced Mascherano into a mistake and, when Ter Stegen blocked his effort 12 yards out, Willian Jose headed the rebound goal-wards and it was sliced into the top corner by Pique as he attempted to hook it off the line.
The goal was no less than La Real deserved, but its lead lasted only six minutes, as Messi found an equaliser to cap Barca's first piece of real quality in the whole of the opening hour.
Neymar drove into space down the left and squared the ball to Messi just inside the area, where the Argentina star took a touch before drilling low past Rulli and into the bottom corner.
Sociedad responded positively to the setback and came within inches of regaining their lead through Vela, whose curling shot from just outside the area came off the underside of the crossbar, before Juanmi's tap-in from the rebound was denied by a contentious offside call.
Suarez bundled through the penalty area only to see his shot blocked in front of the line before Mascherano headed wide from the corner, and Vela clipped the post with a low curling shot from the edge of the area that left Ter Stegen motionless, but there was to be no late hero for either side.