Messi and Francisco Trincao each scored a brace, and Junior Firpo added another as Ronald Koeman’s men claimed their seventh straight league win with the rout. Luis Rioja scored for Alaves in the 57th minute.
The result gives Barca 46 points from 22 matches, eight behind Atletico Madrid‘s league-leading total though Diego Simeone’s side also have a game in hand.
Trincao opened the scoring in the 29th minute before Messi struck from long range with a powerful low shot that hit off the near post and crossed the line.
Rioja pulled a goal back for Alaves before Trincao collected his second 17 minutes later and Messi fired home an even more stunning shot from well outside the area seconds later.
Firpo capped off the scoring in the 80th for a comfortable victory on the night.