Warren Gatland's side arrived at Stadio Olimpico having only scored three tries in the tournament but Rio Dyer, Liam Williams and Taulupe Faletau all crossed to earn their side the bonus point.
The result brought welcome relief for Wales, which could have lost its top-10 status in the world rankings with defeat in what was the likely wooden spoon decider.
Meanwhile, Italy continued its dismal record on home soil, having suffered 25 successive defeats since beating Ireland 10 years ago.
🇮🇹 v 🏴
— Guinness Six Nations (@SixNationsRugby) March 11, 2023
Catch the highlights from today's match between @Federugby and @WelshRugbyUnion here ⬇️#ITAvWAL #GuinnessSixNations pic.twitter.com/2u4qqCjwxN
Owen Williams kicked Wales in front and extended the lead to 10 points in the ninth minute when Rhys Webb's punt bounced fortuitously for Dyer to cross.
Tommaso Allan reduced the deficit but Liam Williams put the visitor back in control, the full-back evading five challenges before going over.
The host attempted to respond and Juan Ignacio Brex was just unable to ground after a brilliant break from Paolo Garbisi.
Wales subsequently pulled further clear when it was awarded a penalty try as Lorenzo Cannone collapsed the maul after Ken Owens drove his side over the line.
Despite the numerical disadvantage after Cannone was sin-binned, Italy made a bright start to the second half with Sebastian Negri collecting Allan’s punt to touch down.
But the momentum was halted when Pierre Bruno was also sent to the bin for a dangerous challenge on Wyn Jones, the winger fortunate to escape a red card after narrowly avoiding contact to the head.
Wales capitalised with the extra man to seal the bonus point, Webb bursting away before offloading for Faletau to go over.
Italy had the final word, though, with Brex crossing after a neat move but, it proved no more than a consolation.