Replacement prop Jenny Davies was the other try-scorer as Wales romped to a bonus point victory – although they left it late with Harries completing her hat-trick on the stroke of full time.
Centre Robyn Wilkins brought her kicking boots with her as she added the extras for three of the four tries and added two penalties while fly half Elinor Snowsill slotted a smart drop goal in the first half to set Wales on their way.
Both sides went into the match having lost their previous two pool games and knew a third loss would give them the wooden spoon for the group.
Wilkins and Zandile Nojoko traded early penalties before Wilkins and Snowsill edged Wales in front with a penalty and drop kick.
The Welsh pack stood up to the bigger South African pack where prop Mega York proved a particular thorn in the side, both in the set-piece and in the loose. Captain Rachel Taylor led from the front in defence as South Africa showed glimpses of their ability but Wales’ defence held firm.
A turnover on the South African line allowed Wales Harries to plunge over for the game’s first try and with Wilkins adding the conversion, Wales went into the break 16-3 ahead.
Davies then plunged over from short range as Wales hunted for tries. Harries bagged her second try when she exploded from a scrum to crash over.
Wales hammered away at the South African line and their patience was rewarded in the final play of the game when Harries somehow dived over in the corner with two defenders hounding her.
The Welsh pack were outstanding individually and as a unit with Taylor exceptional once again. Harries was always a threat with the ball in hand while York proved difficult to bring down with her bullocking runs.
The second row of Jenny Hawkins and Shona Powell-Hughes were also immense.
Halfbacks Sian Moore and Snowsill were composed while the back three of Adi Taviner, Laurie Harries and Dyddgu Hywel constantly looked dangerous with ball in hand.
Wales head coach Rhys Edwards paid tribute to his side who he said finally got what they deserved.
“Deep down we’ve known that performance was in us. We were unlucky in the Six Nations where we were on the end of some disappointing results,” he said.
“Once you are in that short of spiral it is difficult to come out. But we’ve kept banging away at the door and we knew one day we would get the result. It’s very pleasing that the girls went out and executed the game plan perfectly against South Africa. It certainly feels like a weight has been lifted off our shoulders.”
Scorers: South Africa: Pen: Zandile Nojoko
Wales: Tries: Sioned Harries (3), Jenny Davies. Cons: Robyn Wilkins (3), Pens: Wilkins (2) Drop-goal: Elinor Snowsill