Williamson lofted Pat Cummins over the boundary with last man Trent Boult at the wicket to finish on 45 not out in New Zealand’s 152 for nine off 23.1 overs.
Mitchell Starc scythed through the New Zealand batting after Brendon McCullum had given the home side a flying start with 50 from 24 balls, including seven boundaries and three sixes, to take six for 28 from nine overs.
New Zealand’s left-arm fast bowler Trent Boult recorded his best figures in a one-day international, capturing five wickets for one run during his second spell, to finish with five for 27 in Australia’s 151 all out from 32.2 overs.
There was no hint of what was to follow at the start of the day when Australia, who won the toss, set off as if they were determined to post a total around the 400 mark.
Tim Southee conceded 15 runs off the first over of the day, David Warner slashed a six off his second over the short third man boundary and Aaron Finch struck the pace bowler over mid-on into the stands off the third.
With his next ball Southee knocked Finch’s off stump out of the ground after he had scored 14.
Warner and Shane Watson took the score to 80 when McCullum introduced Daniel Vettori into the attack.
Bowling with his accustomed flight and guile, the left-arm spinner put a brake on the scoring and the frustrated Watson (23) perished when he pulled a short delivery straight to Southee at mid-wicket.
Southee switched ends and was rewarded with the wicket of Warner lbw 34 to a full delivery which thudded on to his pads.
Wickets then suddenly began to tumble.Steve Smith (4) was caught behind by Luke Ronchi off Vettori from a thick inside edge and Glenn Maxwell (1) and Mitchell Marsh (0) both dragged deliveries from Boult on to their stumps.
Clarke (12) and Johnson (1) fell to simple catches by Wiliamson off Boult who then bowled Starc for a duck.
Brad Haddin took a four and a six off Vettori’s final over and showed the pitch was not a minefield by reaching the top score of 43 with four boundaries and two sixes.
Martin Guptill took a four and a six off Mitchell Johnson’s opening over and McCullum looked as if he wanted to finish the game before the dinner interval, despite a lengthy break while he received attention after Johnson hit him on the left arm.
After Guptill had departed for 11 and McCullum soon afterwards, Starc raised Australia’s hopes by bowling Ross Taylor (1) before the interval and Grant Elliott (0) with the first ball after the break.
Corey Anderson, who hit Johnson for six, added 52 with Williamson and appeared to have set New Zealand victory before he was caught for 26.
Wickets then fell regularly and it was only Williamson’s composure under pressure which enabled New Zealand to get over the line for a fourth successive victory in the tournament.