With both Real Madrid and Atletico Madrid winning their games this week, Barcelona needed a win to keep in touch in the battle for the La Liga crown.
Lionel Messi had put the hosts ahead in the opening eight minutes but Getafe got their equalizer four minutes later after an own goal from Clement Lenglet.
Sofian Chakla’s 28th minute own goal restored Barcelona’s lead before Messi got his second five minutes later.
The visitors were ever determined and managed to halve their deficit from the penalty spot but goals from Ronald Araujo and Antoine Griezmann in the dying embers sealed Barcelona’s victory.
"I don't think we're stronger than the other three teams [Real Madrid, Atletico and Sevilla]," Koeman said at full time.
"They're winning games too and we all have tough matches left.
"The fight will be until the final day."
Messi was at the heart of every Barcelona’s attack against Getafe and with his future at the Camp Nou still uncertain, Koeman was asked of his opinion about the Argentine’s potential exit.
"If I had spoken to Leo, I wouldn't tell you," Koeman added.
"The decision [to stay] is in his hands. "He never lets his concentration slip. If he does, you don't notice it in his game.
"We need him. Today, he was decisive again. "Let's hope he stays for many years."