Messi missed a penalty in the first half before scoring his first two league goals of the season after the break to seal a second win in two games for Ernesto Valverde’s side.
Alaves started their campaign with a 1-0 loss to Leganes last week, but produced a much improved performance against Barca, who had Andres Iniesta back but were without the injured Luis Suarez.
The Argentine’s spot-kick was the best chance of a half in which Barca dominated only to be frustrated in the final third, but the 30-year-old’s deflected strike after 55 minutes gave the visitors the breakthrough and took him to 350 top-flight goals.
A second close-range finish followed 11 minutes later and only the crossbar denied him a hat-trick, although 3-0 would have been harsh on the home side.
There was time for Paulinho to make his debut as the Catalans joined Real Sociedad on two wins from two matches and head into the international break on a high.
FACT: Messi is the 2nd player from the top5 European leagues to reach 350 goals for the same club, after Gerd Müller with Bayern (365).Genius pic.twitter.com/kFxzgPaj1w