Media playback is not supported on this device
Wales led 13-12 at the break but Fourie du Preez's try with five minutes remaining edged it for the Springboks.
Backs Tyler Morgan and Dan Biggar plus hooker Scott Baldwin joined Wales' list of injured players during the game.
"We don't want to make any excuses. South Africa won... and we weren't good enough to win," said Gatland.
"At the end of the day South Africa did what South Africa do. They got one chance and they took it and that was the result."
Wales lost a trio of front-line stars in centre Jonathan Davies, full-back Leigh Halfpenny and scrum-half Rhys Webb to long-term injuries before the tournament began.
Two more centres - Cory Allen and Scott Williams - were then forced out of action in the opening two pool games against Uruguay and England, with wing Hallam Amos joining them.
Wales then lost the versatile Liam Williams - a full-back or wing - during their punishing final pool match against Australia.
Media playback is not supported on this device
Fly-half Biggar went off the field after a knock to the head just before the scrum which led to South Africa's try.
The player remonstrated with WRU medical manager Prav Mathema and team doctor Geoff Davies, but Gatland backed the decision.
"That's a medical call," he said. "They took him off the field for a head injury assessment; it looked like he'd got a bit of a knock, he looked unsteady on his feet.
"He obviously felt that he was OK, but we support our medical team 100% so there's no issues on that from the coaching set-up."
'We knew it was going to come down to fine margins," said  a "proud" skipper Sam Warburton, who lamented what he felt was a premature end to the campaign.
"It's a quiet changing room - it's hard to find the words, it's all so raw," he said. "It feels premature with two weeks of the competition left. We've been together since June and all those gruelling camps… it's over, done and dusted."
Warburton praised the players who had come in to replace the casualties, saying: "The guys who've stepped in have done a fantastic job. This could be the last World Cup for many of us, but we go out with no regrets."
Warburton was sent off in Wales' 9-8 World Cup semi-final defeat by France in 2011, and after this latest disappointment said: "Hopefully I will be around when one of these tight ones goes our way."
Head coach Warren Gatland said Wales' string of injuries were no defence for their 23-19 World Cup quarter-final defeat by South Africa.