Pakistan score 30 for 1 in reply to New Zealand's 431
Abid Ali was not out 19 with nightwatchman Mohammad Abbas yet to score.
Shan Masood was dismissed for 10 when he poked at a Jamieson ball straying down the leg side and was well caught by wicketkeeper BJ Watling.
It was an uncomfortable stay for Masood who had earlier been dropped at third slip by substitute Daryl Mitchell, who was on the field while Neil Wagner continued to receive treatment after being hit by a Shaheen Afridi yorker while batting.
New Zealand, having started the day at 222 for three, added a further 209 before Wagner was the last man out.
The innings was headlined by Williamson's 129, his 23rd Test century, with sizeable contributions from Watling (67) and Henry Nicholls (56) to go with Ross Taylor's 70 on the first day.
It was a commendable performance by New Zealand after being sent into bat on a green wicket and with Afridi and Mohammad Abbas making life difficult with swing and seam on the first day.
Although there was not the same movement on day two, the drying pitch started to show signs of turn which brought spin into play with Yasir Shah taking three wickets including the prized scalp of Williamson.
Nicholls, who had partnered Williamson in a 133-run stand for the fourth wicket, was the first to fall, bizarrely departing the field when, if he had argued his case, would have been allowed to stay.
He was given out caught off the gloves, and after consulting with Williamson he decided not to seek a review when replays later showed the ball hit his forearm and did not brush either glove or bat.
Williamson, a model of patience and concentration, needed 261 balls to bring up his century, his slowest Test hundred, but once that milestone passed he picked up the pace and needed only 36 more deliveries to get to 129.
The introduction of Yasir Shah brought the end of the New Zealand captain.
With his third ball the legspinner found enough turn to catch the edge of the bat and Haris Sohail took a smart one-handed catch.
Watling, who scored a double century against England on the same Bay Oval wicket a year ago, took over as the batting mainstay.
He featured in a 36-run stand with Mitchell Santner (19) and 66 with Jamieson (32).
After Tim Southee's nine-ball duck, Watling and Wagner put on 33 before Watling nicked a wide Afridi delivery to Yasir Shah at gully.
It was a productive day for Shah who also took the wickets of Southee and Wagner (19) to return figures of three for 113 while Afridi took four for 109.
New Zealand 1st innings (overnight 222-3)
T. Latham c Azhar Ali b Afridi 4
T. Blundell c Yasir Shah b Afridi 5
K. Williamson c Sohail b Yasir Shah 129
R. Taylor c Rizwan b Afridi 70
H. Nicholls c Masood b Shah 56
B. Watling c Yasir Shah b Afridi 73
M. Santner c Rizwan b Ashraf 19
K. Jamieson c Rizwan b Abbas 32
T. Southee b Yasir Shah 0
N. Wagner c Masood b Yasir Shah 19
T. Boult not out 8
Extras: (lb5, w5, nb6) 16
Total:(10 wickets; 155 overs) 431
Fall of wickets: 1-4 (Latham), 2-13 (Blundell), 3-133 (Taylor), 4-266 (Nicholls), 5-281 (Williamson), 6-317 (Santner), 7-383 (Jamieson), 8-388 (Southee), 9-421 (Watling), 10-431 (Wagner)
Bowling: Afridi 36-7-109-4 (1nb), Abbas 31-14-49-1 (1w), Ashraf 19-8-40-1 (1w), Naseem Shah 25-3-96-1 (3w, 5nb), Yasir Shah 37-4-113-3, Shan Masood 2-1-2-0, Sohail 5-0-17-0
Pakistan 1st innings
S. Masood c Watling b Jamieson 10
Abid Ali not out 19
M. Abbas not out 0
Extras (nb1) 1
Total (one wicket: 20 overs) 30
Fall of wickets: 1-28 (Masood)
To bat: Azhar Ali, Fawad Alam, Haris Sohail, Mohammad Rizwan (capt), Faheem Ashraf, Yasir Shah, Shaheen Afridi, Naseem Shah
Bowling: Southee 7-2-13-0, Boult 4-2-8-0, Jamieson 6-4-5-1, Wagner 3-1-4-0 (1nb)
Umpires: Chris Gaffaney (NZL), Wayne Knights (NZL)
TV Umpire: Chris Brown (NZL)
Match Referee: Jeff Crowe (NZL)