The SA side, looking for a seventh victory in the first tournament of the HSBC World Sevens Series, started well enough against Kenya, when Ryan Oosthuizen was given the overlap to score in the corner.
Two quickfire tries by Kenya rocked the Blitzboks though. First, the South Africans lost a line-out ball and then slipped off several tackles, allowing Kenya in under the posts for a converted try.
Kenya struck again soon after with a well-placed kick resulting in a second try and a 12-5 lead going into the break.
Springbok Sevens coach, Neil Powell, used his bench wisely in the second stanza and that resulted in two tries that proved decisive.
First Rosko Specman used his speed, swerve and guile in a determined run to the line and his try under the poles allowed Justin Geduld to kick his first conversion of the match.
More was to follow from the bench as Seabelo Senatla saw some space following a ruck and outpaced the Kenyan defence for his first try in Dubai. The South Africa record-try scorer in the World Series extended that tally to 225.
Powell said afterwards the match served as a good wake-up call.
"You cannot just show up and expect things to happen. If you don't respect the ball - and we didn't - you will give the ball to the opponents and credit to Kenya, who used that well,” said Powell, who was also pleased that they had to fight back and come from behind.
"The reality is that the series is becoming more and more competitive every year and there are no easy games anymore, so when you make mistakes, you will pay for them.
"The defence in that last minute and a half, when they attacked again, was great and I am happy with that. Tomorrow first up we face Spain and we need to be sharp for that."
The match against Spain starts at 11h48, before they face England at 17h54.
South Africa 17 (5), Kenya 12 (12)
South Africa - Tries: Ryan Oosthuizen, Rosko Specman, Seabelo Senatla. Conversion: Justin Geduld.
Kenya - Tries: Alvin Otieno, Vincent Onyala. Conversion: Daniel Taabu.