Guptill returned to form and smashed 97 to give New Zealand a solid start after being put in to bat.
Williamson scored a half-century and added 131 with Guptill for the second wicket.
Neesham smashed 45 off 16 to help New Zealand post 219 for 7.
Santner picked up four wickets as Australia slipped to 113 for 6.
Stoinis (78 off 37) and Daniel Sams (41 off 15) smashed 92 off 40 before Australia fell short by just four runs. With the win, New Zealand took a 2-0 series lead.