Wales regained the lead in the opening minute of the second half when Cummings hacked on twice and then gathered the loose ball to go over.
Leggatt-Jones converted and then banged over a long-range penalty to make it 24-17, before captain Gwynne crashed over from close range to put his side in command.
Back came the Aussies and wing Riley Whifeld finished acrobatically down the left to make it 31-22 with 55 minutes gone.
With lock Luke Evans given a 20-minute red card for a high tackle, Australian pressure led to a close-range try for prop Edwin Langi.
Wales were creaking but responded with a penalty try after bravely going to the corner despite being a man down, a decision that earned seven points and led to a sin bin for Toby Brial.
Australia responded to move within two points when John Greenfell sneaked over, and there were wild celebrations from those in gold when Fowler raced over down the left.
The conversion took place before the TMO showed the footage that led to Welsh relief and a meeting with the Scots.
Wales Under-20s: Lewis Edwards (Ospreys); Rhys Cummings (Cardiff), Osian Darwin-Lewis (Cardiff), Steffan Emanuel (Cardiff), Tom Bowen (Cardiff); Carwyn Leggatt-Jones (Scarlets), Sion Davies (Cardiff); Dylan James (Ospreys), Tom Howe (Cardiff), Jac Pritchard (Scarlets), Will Evans (Scarlets), Osian Williams (Bristol), Deian Gwynne (Gloucester, capt), Caio James (Gloucester), Evan Minto (Dragons).
Replacements: Oscar Thomas (Bath), George Leyland (Bristol), Yestyn Cook (Scarlets), Luke Evans (Exeter), Alex Ridgway (Bath), Cai Gealy (Bristol), Lloyd Lucas (Cardiff), Bailey Cutts (Bath).
Yellow card: Leggatt-Jones
20-minute red card: Evans
















































