The LaLiga's leader's captain took his personal tally to 36 goals against Sevilla in all competitions, before Luis Suarez netted a late fourth.
Jesus Navas and Gabriel Mercado had put Pablo Machin's side in the ascendancy, but a fourth game without a win has dealt serious damage to its UEFA Champions League ambitions.
A bold Barca line-up that included Suarez, Philippe Coutinho and Messi in attack proved susceptible to the Sevilla counter-attack, with Navas marking his 300th LaLiga start with a precise finish after Wissam Ben Yedder sent him clear in the box.
Sevilla's lead lasted only four minutes, though, with Messi blasting in a fine volley from near the edge of the box after Ivan Rakitic was given time to cross from the left.
Barca continued to struggle against the Sevilla press and found itself behind again before the break. Ter Stegen was forced into a hasty clearance, Pablo Sarabia ran towards the byline and, as the visiting defence seemed to expect the ball to be going behind, Sarabia cut it back for Mercado to sweep home.
Ernesto Valverde brought on Sergi Roberto and Ousmane Dembele at the break and the changes should have paid dividends early in the second half, but Dembele failed to make clean contact with the ball after being teed up by Suarez.
It was an error from goalkeeper Tomas Vaclik that allowed Barca to level once more. Rakitic cut out his clearance and found Dembele, he squared to Messi, and the captain curled a right-foot strike high into the net.
With only five minutes of normal time left, Messi clipped the ball over Vaclik to put Barca ahead after Carles Alena's shot deflected into his path, and he sent Suarez through to lob the keeper in style and seal the win in stoppage-time.
Barca's lead at the top is back to 10 points, meaning Atletico Madrid needs a victory over Real Sociedad on Monday (AEDT) to keep up the pressure.
It also sets up Valverde's side nicely for a daunting week in which it visits Real Madrid twice, first in the Copa del Rey and then in the league.
The defeat is particularly bad news for Sevilla, with Getafe having moved ahead of it into the UEFA Champions League places by beating Rayo Vallecano earlier.