Usman Khawaja anchored Australia's recovery following a top-order collapse with a composed 88 to take the score to 243-9 on Saturday before becoming a victim of Trent Boult as the New Zealander completed a hat-trick.
Australia, who beat New Zealand in the 2015 final, slumped to 92-5 before Khawaja and Alex Carey (71) revived the innings with a sixth-wicket stand of 107 to give their powerful attack a defendable total on a used pitch that was making life difficult for batsmen.
Khawaja was bowled in the final over by left-arm quick Boult to end a 129-ball innings featuring just five fours.
Next ball, the fourth of the over, saw Boult bowl Mitchell Starc and he then had Jason Behrendorff lbw with a yorker — although there was a delay in celebrating his treble as the tailender gambled on a review.
It was the first hat-trick by a New Zealander at a World Cup and the second of the tournament after India's Mohammed Shami achieved the feat against Afghanistan.
Nathan Lyon survived the last ball, Boult finishing with 4-51 at a sun-drenched Lord's after he had earlier removed Australia captain Aaron Finch.
Australia had already qualified for the last four out of the 10-team round-robin phase before Finch won Saturday's toss and decided to bat first.
Australia's first-wicket pair have been key to much of their success at this tournament, with Finch and David Warner having scored 657 runs together in eight matches, including Saturday's fixture, at an average of 82.12.
But it was a different story against the Black Caps, with both Finch (8) and Warner (16) dismissed cheaply.
Boult had Finch plumb lbw to a ball that nipped back in the fifth over and two balls later Khawaja almost went for a duck, only for a diving Guptill to drop a catch at second slip.
New Zealand fast bowler Lockie Ferguson, however, struck first ball.
He surprised Warner, who came into this match as the tournament's leading run-scorer with 500 runs, courtesy of a sharply lifting delivery the left-hander could not evade as he tried to sway out of the way before wicket-keeper Tom Latham held a simple catch.
Steve Smith fell for five after Guptill, now at short fine leg, hold a sensational diving catch off the bowling of Ferguson.
Warner and Smith were booed on and off the field following their recent returns after each served 12-month bans for their roles in a ball-tampering scandal during a Test in South Africa.
They were both back in the pavilion when Jimmy Neesham took two wickets for no runs in four balls to reduce Australia to 92-5.
Neesham had Marcus Stoinis (21) caught behind before the all-rounder held a brilliant diving left-handed catch off his own bowling after dangerman Glenn Maxwell (one) miscued a pull.
The collapse allowed Khawaja to bat in his usual style without fear of being criticised for slow scoring.
Fellow left-hander Carey added impetus, the wicketkeeper facing 72 balls and hitting 11 fours before he holed out off New Zealand captain Kane Williamson's occasional off-spin.