Guptill hit four sixes in his 87 from 58 balls, while skipper Williamson took only 48 deliveries for his 72.
Earlier, Umar Akmal's unbeaten 56 from 27 balls had helped Pakistan reach 168-7 from their 20 overs in Hamilton.
The series is now level at 1-1 with the decider in Wellington on Friday.
None of the Pakistan bowlers were able to break the Guptill-Williamson partnership - with Mohammad Amir, playing only his second international game since returning from a five-year ban for spot-fixing, one of their most expensive bowlers.
Amir's three overs cost 34 runs, fellow left-arm paceman Wahab Riaz leaked 30 in three overs, while skipper Shahid Afridi (0-38) was hit for successive sixes by Guptill.
The only chance either batsman offered was when spinner Shoaib Malik spilled a return catch from Williamson when he had 61.
The Black Caps, experimenting ahead of the forthcoming World Twenty20, rested pacemen Trent Boult and Matt Henry, giving the new ball to left-arm spinner Mitchell Santner.
Martin Guptill and Kane Williamson broke the record for the highest stand in Twenty20 international cricket, with a match-winning 171 as New Zealand crushed Pakistan by 10 wickets.