Sixth-placed Sevilla, the last team to beat Barca back in early October, led when Vitolo volleyed in a left-wing cross at the far post.
Messi’s sublime 20-yard free-kick levelled before he teed up Gerard Pique to sidefoot in the close-range winner.
Barca, who have not lost in 34 games, are now eight points clear in La Liga.
The Catalan side’s fightback at the Nou Camp means they have equalled the longest unbeaten run of a La Liga team in all competitions, levelling Real Madrid’s run in the 1988-89 season.
But more concerning for the Bernabeu club is the huge gap that has opened up between them and their arch-rivals Barca.
Zinedine Zidane’s third-placed side are 12 points adrift of the leaders following Saturday’s home derby defeat by Atletico Madrid.
Second-placed Atletico won 1-0 at the Bernabeu to remain Barca’s nearest challengers.