Getafe forward Jaime Mata sent Barca goalkeeper Neto the wrong way from the penalty spot to score the only goal in the 56th minute after visiting midfielder Frenkie de Jong had been penalised for treading on Djene Dakonam's foot.
The result left Barca ninth with seven points after four games, a week before the Clasico at home to Real Madrid, who remain top on 10 points having played five matches. Getafe's win puts them level on points with the league leaders.
Koeman made a number of changes to the Barcelona side who had drawn 0-0 at home to Sevilla in their last outing, handing first starts of the season to new arrival Dest at full back, teenage winger Pedri and forward Ousmane Dembele.
Barca had played well in the first half and almost took the lead when Lionel Messi thumped a shot against the post, while Antoine Griezmann missed an even clearer chance before halftime, blazing over when through on goal unchallenged.
Getafe defended well and should have scored at least once more through Colombian Cucho Hernandez, who struck the bar and a few minutes later raced clear on the counter-attack with only Neto to beat but shot high into the empty stand behind the goal.
Getafe's former Barca player Marc Cucurella also fluffed a chance and the Catalans could have capitalised late on to grab an equaliser but Messi missed from inside the area while Djene almost scored an own goal, glancing a cross against the post.
"Today was not our day," said Barca midfielder Sergio Busquets. "We only played well in one half and had the odd chance at goal. We knew it was going to be a tough match.
"They took the lead through a one-off moment and they got very comfortable once they were 1-0 up.
"We wanted to play with more speed and fluidity but we weren't able to, although we kept trying and we hit the woodwork right at the end."
Koeman was seen arguing with Getafe boss Jose Bordalas at the end of the match and explained in the post-match news conference that Cameroon international Nyom had mocked him.
"I told him [Bordalas] that [Nyom] had shown me a lack of respect, he had said two or three very ugly things to me which I won't repeat. He insulted me," Koeman said.
Bordalas said he did not think his player had insulted Koeman.
"I'm here to talk about football, not about controversy. I haven't spoken to the boy, I will tomorrow, but I doubt that Nyom would do that, I know him well," said the Getafe coach.
"He's very competitive, but he's a very respectful person. I don't allow bad behaviour among my players but I doubt that Nyom insulted him."