Wales trailed 17-11 with just a couple of minutes left but Davies chipped ahead and found Ashley Evans to cross for a late, late try.
It left Davies needing to add the extra two points to put Wales back into the lead, the fly half showing nerves of steel to kick the goal and set up a final showdown with either England or New Zealand.
In a hugely physical, close encounter, Wales stood up to the South African pack magnificently during a superb first half performance. Captain Ellis Jenkins was to the forefront of everything that was good about Wales with full back Jordan Williams a constant attacking threat from full back.
But despite more than matching their opponents in the first 40, Wales went into the break 7-6 behind. Davies had kicked two penalties but a try from Irne Herbst and a conversion from Handre Pollard ensured the Springboks were ahead.
In a rip-roaring second half, Jenkins and Kwagga Smith exchanged scores before the boot of Pollard looked to have ended Wales’ hopes.
They were not to be denied though and Evans’ score at the death, converted by Davies, ensured Wales went mad at the final whistle.
It had been a superb start for South Africa, the junior Springboks dominating possession in the opening 10 minutes, creating a number of opportunities in the process. Indeed, only try saving tackles from Scarlets pair Rhodri Williams and Jordan Williams kept the scores level. First, a short 22 restart from South African scrum half Stefan Ungerer saw him break clear and pass to Seabelo Senatla. Rhodri Williams kept pace with the flying winger though and covered superbly to save the day.
His namesake Jordan Williams produced a similarly heroic tackle minutes later and up against a big South African pack, you worried for Danny Wilson’s men. Wales though, are made of stern stuff and after one huge scrum sent the Springbok pack flying backwards, the men in red seemed to grow in confidence. Sion Bennett came close to scoring following a nice line-out combination with Ethan Lewis while Jordan Williams showed why he was selected with another trademark break.
These were positive signs for Wales and in the 21st minute, they moved into a 3-0 lead courtesy of Davies’ reliable left boot. The two sides were now evenly matched and with a three point advantage, Wales were doing more than just holding their own.
Pollard pulled a penalty effort wide for South Africa but his side were now under pressure, a huge midfield hit from Lewis a reminder of Wales’ commitment to reaching the final. And when South Africa were penalised at another big Wales scrum, Davies extended the lead to six.
As reigning Junior World Championship winners, South Africa aren’t used to being behind and despite their failure to create many chances, they moved into the lead just before the half time whistle. A short line-out caught Wales napping, Herbst crashing over and with Pollard converting his score, Wales undeservedly trailed at the break.
Following such a positive first half showing, Wales would have been disappointed to go in behind. But at the start of the second period, they were unlucky not to see South Africa extend their lead. Pollard was again wide from the tee while only a tackle from Davies stopped Luther Obi from adding a second try.
After stopping a break from Obi, Davies then played a key part in Wales regaining the lead through a try from skipper Jenkins. It was Jack Dixon who made the hard yards, the ball then recycled through Davies and Hallam Amos to Jordan Williams. The Scarlets full back showed wonderful skill to offload out of the tackle for Jenkins to crash over. Davies missed the touchline conversion but Wales now had the lead their performance deserved.
Sadly for head coach Wilson, no sooner were Wales ahead, than South Africa hit back. With a three man overlap out wide, the Springboks weren’t going to waste the opportunity, replacement Smith the scorer. Pollard booted the extras and after each kicker had missed another opportunity, Wales went into the final 10 minutes three points behind.
Pollard soon extended that lead but Wales were not to be denied. Another scintillating Jordan Williams break gave Wales field position with Davies chipping across for Evans to score in the corner.
And when Davies nailed the touchline conversion almost on the final whistle, Wales could celebrate reaching the final two.
WALES: 18
Tries: Ellis Jenkins, Ashley Evans; Convs: Sam Davies; Pens: Davies (2)
SOUTH AFRICA: 17
Tries: Irne Herbst, Kwagga Smith; Convs: Handre Pollard (2); Pens: Pollard