The champions got off to a flying start when Chilean midfielder Arturo Vidal scored with a diving header in the second minute, while Danish international Martin Braithwaite scored his first goal for Barca later in the first half.
Jordi Alba then added a third goal for Barca in the 79th minute after latching on to a through ball from Messi, who had also set up Braithwaite’s goal with a header.
The Argentine then completed the scoring with a deflected strike in stoppage time, netting 20 league goals for the 12th season in a row.
The win takes Barca on to 61 points after 28 games, five clear of nearest challengers Real Madrid, who host Eibar on Sunday in their first game back.
The game was played behind closed doors to prevent further spread of the novel coronavirus, but a fan wearing an Argentina shirt somehow made it on to the pitch, only to be swiftly taken away by security guards.