The hosts came into this clash on the back of their Copa del Rey triumph, which has since been surpassed by the proposition and consequent cancelation of the European Super League.
However, Barcelona put off-field distractions behind them to give a masterclass performance against Getafe.
They would, however, have been wary of the threat posed by Los Azulones, with the Madrid outfit having dented their city rivals' title hopes with two goalless draws in recent weeks.
Barcelona made one change to the side that started the Copa final, with Sergi Roberto coming in for Sergino Dest.
The Catalans made their intentions known when they hit the post as early as the 4th minute through a thunderbolt by Lionel Messi.
The Argentina international was, however, not to be denied four minutes later as he finished off an exquisite defense-splitting through-ball by Sergio Busquets.
Getafe drew level just three minutes later when Clement Lenglet turned the ball into the back of his net for an unfortunate own goal.
The pendulum swung the other way soon after, with a mix-up between Sofiane Chakla and David Soria seeing the former pass the ball into his own net to put Barcelona 2-1 ahead.
Lionel Messi struck the post once more with a right-footed shot but was on hand to convert the rebound from an acute angle in the 33rd minute.
The first 20 minutes of the second half were played at a slower pace, but things picked up after Ronald Araujo stamped Enes Unal in the area.
Referee Jorge Vazquez initially waved play on but rescinded his decision and awarded the visitors a penalty after consultations with the VAR.
Unal stepped up and converted with ease to threaten a grandstand finish to the game.
Any hopes of a comeback were extinguished in the final five minutes. First, Ronald Araujo rose highest to head home a corner kick by Lionel Messi before Antoine Griezmann won and converted a penalty in the third minute of injury time.
Up next for the Blaugrana will be a visit to take on Villarreal. Getafe are next in action when they square off against Huesca on Sunday.
Here are five talking points from the game.
#5 Barcelona reinstall themselves in the title race
Barcelona's 2-1 loss to Real Madrid in El Clasico a fortnight ago had seemingly put paid to the Catalan giants' title ambitions.
However, results have since worked in Barcelona's favor. First, Atletico Madrid stuttered to a 1-1 draw with Real Betis a day later, while Los Blancos were held by Getafe last weekend.
This gave Barcelona a huge window of opportunity to capitalize on these slips, and they have responded with an emphatic performance.
The Catalan side came into this game in 4th place but knew that a victory would take them to within five points of table-toppers Atletico Madrid with a game in hand.
Barcelona made their intentions very clear from the onset and despite minor periods of threat from the visitors, the hosts were largely comfortable.
With the La Liga title race going down to the wire, it looks incredibly likely that the clash between Barcelona and Atletico Madrid in May could well decide the destination of the title.
This win leaves Ronald Koeman's men with their destiny in their hands, and they are well on course to wrest the title from their arch-rivals.
#4 Ronald Araujo goes from zero to hero
Ronald Araujo has been one of the biggest revelations from La Masia this season and has slowly become integral to Ronald Koeman's plans.
The 22-year-old started on the bench against Getafe but came on for Gerard Pique at halftime.
His ill-advised stamp on Enes Unal in the area saw Getafe score a scarcely-deserved second goal. At that point, the scoreline was just a one-goal margin, and this gave the visitors the impetus to push forward.
However, any hopes of an unlikely comeback were squashed when Araujo made amends for his earlier error by giving Barcelona a two-goal cushion.