First-half strikes from Sergi Roberto and Memphis Depay either side of Sandro Ramirez's leveller proved the difference for Ronald Koeman's men as they maintained their unbeaten start to the season.
The contest was barely 90 seconds old when the hosts took the lead as Roberto converted Jordi Alba's cut-back. Barca were pegged back shortly after when Sandro Ramirez, once of Barcelona, fired beyond Marc-Andre Ter Stegen for Getafe.
However, the home side restored their advantage soon after when Memphis Depay collected Frenkie de Jong's pass before producing a sublime piece of skill to fire beyond David Saria in the Getafe net.
Here's how the Barcelona players rated.
BARCELONA PLAYER RATINGS
1. Goalkeeper & defenders
Marc-Andre Ter Stegen (GK) - 5/10 - Slow to get down to Sandro's strike, but improved as the game went on.
Emerson Royal (RB) - 6/10 - Didn't cover himself in glory for Getafe's equaliser in the first half and failed to provide a threat going forward for Barca, though he made a crucial intervention on 54 minutes to prevent an equaliser.
Ronald Araujo (CB) - 7/10 - A commanding presence in the absence of Gerard Pique, the 22-year-old could be the heir to the Spaniard's throne.
Clement Lenglet (CB) - 5/10 - Efficient at bringing the ball out from the back and it was his establishing pass which led to Barca's opener, but often appeared hesitant defensively.
Jordi Alba (LB) - 7/10 - Expertly timed cut-back for Roberto's opener and linked up well with Memphis on the left.
Sergio Busquets (DM) - 6/10 - Operated with his usual elegance, providing the base for Barcelona to play with freedom in the final third, but was wasteful with his passing in the final third.
Sergi Roberto (CM) - 6/10 - Commendable display replacing Pedri in midfield, and his threat was rewarded by opening the scoring inside a minute.
Frenkie de Jong (CM) - 6/10 - Weighted his through pass perfectly for Depay's strike and kept Barca ticking throughout.
Antoine Griezmann (RW) - 4/10 - Jeered by the Camp Nou crowd when he misplaced a return pass in the first half and looked short of confidence.
Martin Braithwaite (ST) - 5/10 - Quiet and struggled to impact the game as the focal point of Barca's attack.
Memphis Depay (LW) - 8/10 - An exquisite piece of skill and finish to grab Barcelona's second as he moved with an air of confidence.
Sergino Dest (RB) - 6/10 - Offered a threat in the final third in his time on the pitch.
Nico (LW) - N/A
Gavi (CM) - N/A
Oscar Mingueza (CB) - N/A