The Springboks appeared on course to claim the win but a dramatic late try from Ryan Elias saw Wales snatch the victory for Gatland's men.
Both sides opted to field experimental line-ups and some observers, most notably former Wales captain Gwyn Jones, had questioned the value of the fixture.
Gatland felt any questions were answered by the performance however, and he was delighted with the way his younger players handled the occasion.
"Who would want to be a coach?" Gatland said, as reported by Sky Sports. "The end was dramatic and maybe our game management could have been better, but I thought we played well in the first half.
"The young guys will take a lot from this and there will be a lot of learning from them moving forwards. I thought captain Ellis Jenkins was outstanding and so was Tomos Williams.
"There are a couple of things to work on, but we are looking forward to going to Argentina now which will be a big step up for us."