Arwel Robson's late penalty edged it, the fly-half picking himself up to score after being felled by flanker Jacopo Bianchi, red-carded for the hit.
Callum Bradbury, Ryan Conbeer and Phil Jones claimed tries for Wales.
Giovanni D'Onofrio and Dario Schiabel crossed for Italy, with Antonio Rizzi kicking 14 points.
Jason Strange's young Wales side lost to Australia,England and Scotland during the tournament, with their only other victory coming against Samoa.
Wales U20: Phil Jones (Ospreys); Jared Rosser (Dragons), Ioan Nicholas (Scarlets), Owen Lane (Cardiff Blues), Ryan Conbeer (Scarlets); Arwel Robson (Dragons), Reuben Morgan-Williams (Ospreys); James Botham (Cardiff Blues), Will Jones (Ospreys, capt), Shane Lewis-Hughes (Cardiff Blues), Will Griffiths (Ospreys), Kieron Assiratti (Cardiff Blues), Elllis Shipp (Dragons) Rhys Carre (Cardiff Blues).
Replacements: Owen Hughes (Dragons), Tom Mably (Cardiff Blues), Steff Tjomas (Scarlets), Aled Ward (Cardiff Blues), Syd Blackmore (Bath), Dane Blacker (Cardiff Blues), Connor Edwards (Dragons), Cameron Lewis (Cardiff Blues).
Wales ended their World Rugby Under-20 Championship campaign on a positive note by beating Italy in the seventh-eighth place play-off in Tbilisi.