Alexis Sanchez and David Villa made the most of a rare place in the starting lineup with goals either side of Messi's strike and Andres Iniesta, Cristian Tello and Gerard Pique were also on the scoresheet as Barca racked up a 20th victory in 23 matches this term to move on to 62 points.
Atletico Madrid have 50 points in second place ahead of their game at Rayo Vallecano later on Sunday (2000 GMT), four ahead of third-placed Real Madrid, who thrashed Sevilla 4-1 at the Bernabeu on Saturday.
Barca's interim coach Jordi Roura, standing in for Tito Vilanova who is recovering from throat surgery, rested several key players for Getafe's visit to the Nou Camp, including Spain trio Pedro, Cesc Fabregas and Sergio Busquets.
Alexis struck in the sixth minute, Messi made it 2-0 seven minutes later and Villa put the game well beyond Getafe, who are 12th on 29 points, with a third just before the hour.
Messi surged forward and laid the ball off for substitute Tello to curl in a fourth 11 minutes from time before a mistake from Jordi Alba let in Alvaro Vazquez to pull a goal back for the visitors in the 83rd minute.
Iniesta picked up a loose ball and fired in from close range in the 90th and Pique rounded off the party in the second minute of added time with a tap-in from Thiago Alcantara's unselfish layoff.