Despite facing 14 men for 56 minutes, Wales relied on an Alex Cuthbert try with 13 minutes left to hit the front and beat Fiji from behind.
Fiji-born Sevu Reece scored a hat-trick as New Zealand trounced Fiji 60-13 to sweep their series 2-0 in Hamilton on Saturday.
New Zealand have made 13 changes to the side that scored more than a hundred points against Tonga last Saturday for this weekend's Test against Fiji in Dunedin.
Six Nations champions Wales will face world champions South Africa, New Zealand, Fiji and Australia this autumn.
Pacific islands teams Moana Pasifika and Fijian Drua have been granted conditional licences to join a proposed Super Rugby competition next year.
England, Wales, Scotland and Ireland learn who they will play first at the 2023 Rugby World Cup in France, with the hosts to open against New Zealand.
England have been drawn alongside Japan and Argentina for the Rugby World Cup 2023, while Ireland and Scotland will face defending champions South Africa.
The 2023 Rugby World Cup in France has been extended by one week to allow all teams at least five days preparation before pool matches.