“We drew so we needed to win whatever before the international break,” said Roberto, who also scored in the opener in Barcelona’s 4-2 win over Real Sociedad. “It was a difficult game, but we won.”
Getafe, who lost three times in a row at the start of the league, equalized in the 18th with a shot from Sandro Ramírez. It was Getafe’s first league goal of the season.
“It’s been a difficult start to the season for us but we have to keep working hard to recover,” said Ramírez, a former Barcelona player.
Barcelona striker Martin Braithwaite, who scored two goals in the opening game against Sociedad, was not recognized for offside towards the end of the game.
Depay almost added his second from close range in the 85th round, but sent the ball over the bar.
More than 26,000 fans were admitted to the Camp Nou.
Barcelona had to do without veteran defender Gerard Piqué due to a muscle injury.
The Catalan club have seven points, as do rivals Real Madrid, who won 1-0 at Real Betis on Saturday. Seville, Valencia and Mallorca also have seven points.
Newcomer Rayo Vallecano won for the first time since his return by beating Granada 4-0.