Williams, famous for gifting his winning medal at the 2015 Rugby World Cup to a fan,
had almost gifted the South Africans victory when his misplaced pass led to Cheslin Kolbe crossing to give the "Blitzboks" a late 14-12 lead.
But he atoned almost immediately with a trademark offload to put in Joe Webber under the posts as the host and defending champion won 19-14.
Williams, who is hoping to add to his two World Cup triumphs with the All Blacks in the 15-a-side game with gold at the Rio Olympics in sevens rugby later this year, made his bow in the opening pool game against Russia.
With the score 31-7 in favor of the home side, he was on hand to receive a short pass and run under the posts.
"It was a sneaky scab try, I was just backing up, but like I said I just want to learn. I am grateful to be playing amongst such talented players.
"It is always good to play at home, and in the All Blacks jersey, in Wellington, from an NZ perspective I'm not sure it gets much bigger than this," he told the official World Rugby Sevens Series website.
His later interventions proved more crucial as New Zealand secured a third straight win to set up a quarterfinal against Kenya.
South Africa, which won the Cape Town round on home soil
, faces a tough last eight tie with Australia, one of three sides to win all three games in the pool qualification.
The other was Fiji, co-series leader with South Africa, which now takes on the United States.
England, winners of Pool C despite a disappointing final game defeat to Samoa, will play the Argentina Pumas in the other quarterfinal Sunday.