Both sides emerged from pool play in the third leg of the World Series unbeaten with Fiji untroubled in their three matches.
New Zealand, however, were on the brink of losing to South Africa when double 15-a-side World Cup Williams set up the match-winning try with a trade-mark offload.
Australia were the only other team to win all their pool games, although they struggled at times, while England topped their pool despite losing to Samoa.
South Africa, Argentina, Kenya and USA also qualified for the play-offs on Sunday.
Fiji, co-leaders with South Africa after the first two rounds of the 10-leg series, looked serious contenders in Wellington as they waltzed through Pool B.
Their closest match was a 31-10 win over their pool runners up Argentina.
South Africa, however, fell 19-14 in a tense match-of-the-day against New Zealand.
New Zealand led 12-7 going into the final minute when Williams attempted an offload when surrounded by South Africans.
The ball was snatched away which saw Cheslin Kolbe score to put South Africa up 14-12.
There was just enough time left for the restart in which New Zealand recovered the ball and this time a flawless Williams offload put Joe Webber away for the match-winning try.
Australia had their anxious moment against Portugal in Pool D when they were down 12-0 at half-time before fighting back in the second half with three unanswered tries to win 19-12.
England finished as the fourth top qualifier, winning Pool C on points differential after losing their final match against 2009-10 world champions Samoa to finish the day with two wins and a loss, the same as USA.
The USA, who were also troubled by Samoa with Carlin Isles producing the winning try after the final hooter, lost their only game to England 19-5.
In the quarter-finals New Zealand play Kenya, England are against Argentina, Australia face South Africa and Fiji play the USA. – AFP
Original source: NZ sink Blitzbokke