The Argentina star swept in a clever free-kick midway through the second half before Philippe Coutinho netted a fine second, with Messi doubling his tally late on to secure all three points for Ernesto Valverde's side.
Alaves did little to trouble Barca's goal even after going behind, but it was far from a convincing display from the hosts, who handed league debuts to Arthur and Arturo Vidal in the second half.
Barca looked laboured despite all their possession in the first half, with creativity at a premium in Coutinho's absence, although captain Messi hit the bar with a free-kick and Ousmane Dembele fired straight at Fernando Pacheco when through one-on-one.
Coutinho was introduced at half-time for full-back Nelson Semedo, but there was little to get the 52,356 fans inside Camp Nou out of their seats until the 64th minute, when Messi sent a free-kick under the wall and into the net.
The Argentina star struck the woodwork again despite nearly slipping over in the build-up, before Luis Suarez – making his 200th appearance for the club – was denied by Pacheco when capitalising on a defensive slip.
Barca secured an opening-day win for the 10th time in succession eight minutes from time, though, when Coutinho rifled home from just inside the area, before Messi brought down Suarez's pass and slotted home with the last kick.
What does it mean: Valverde's men still in pre-season mode
This was the 10th season in a row in which Barca have won their first LaLiga match, and Messi's free-kick was certainly a fine way to mark the occasion, but there is much work to be done.
The champions were far too ponderous in possession throughout, with midfielders reluctant to run from deep and Dembele too often surrendering the ball when trying to stretch Alaves' rigid 4-5-1 set-up.
It rather felt like a friendly match, with more than 40,000 seats going unused in the stands and Barca never getting out of third gear, while the visitors made no change to their approach even after going behind.
Pat on the back: Messi still Barca's main man
It was fitting that Barca's 6000th goal in the top flight was scored by the man who got their 5000th back in 2009.
Messi, on his first league outing as club captain and without Andres Iniesta at the club, clipped the bar in the first half before trying a different tactic to put his side ahead in the second. Some sublime close control and a deft finish added late gloss to the scoreline.
With Suarez and Dembele off the boil and Coutinho only introduced off the bench, it fell on Messi to become the main creator and goal threat for his side, and only the woodwork denied him a hat-trick.
Boot up the backside: Dembele frustrates again
Dembele looked ready for an explosive start to the season when he blasted in the winner in the Supercopa de Espana, but this was another forgettable outing at Camp Nou for the forward.
He squandered two decent first-half chances with poor finishes after failing to pick out Messi in a two-on-one situation, and his runs in the final third too often ended in possession being gifted to Alaves.
Key Opta Facts
15 - Lionel Messi is the first player in La Liga to score in 15 consecutive seasons in the 21st century (385 goals). Critical. pic.twitter.com/JYMXnU2anZ— OptaJose (@OptaJose) August 18, 2018
- Barcelona are the second team in LaLiga history to reach 6000 goals in the competition (6002 goals), after Real Madrid (6041 goals).
- Lionel Messi is the first player to score in 15 consecutive LaLiga seasons in the 21st century (385 goals).
- Barcelona have scored 6002 goals in LaLiga history, 6.4 per cent of them scored by Lionel Messi (385 goals).
- Luis Suarez has equalled Dani Alves as the player with the most assists to Lionel Messi in LaLiga (26 apiece).