Medium pacer Hasan Ali took his maiden five-wicket haul with 5-45 while leg-spinner Yasir Shah finished with 5-110 — his 14th five-wicket haul in an innings — as New Zealand lost their last six wickets for 29 runs.
Henry Nicholls and Bradley-John Watling defied Pakistan as New Zealand reached 200-4 at tea.
New Zealand were in danger of losing the Test after three quick wickets fell in the space of just 22 runs in the first session with medium pacer Hasan Ali taking two in the same over.
But Watling survived a leg-before decision on review after umpire Bruce Oxenford raised his finger off Bilal Asif for 15. Watling took full advantage of the reprieve and added 67 in the second session without losing a wicket.
Hasan (3-30) had brought Pakistan back in the game in the first session.
Hasan, who had opener Tom Latham yesterday, trapped a dangerous looking Taylor leg-before with a sharp incoming delivery for 19 and then had Jeet Raval caught behind by wicketkeeper Sarfraz Ahmed for 46.
Raval had added 86 for the second wicket with Kane Williamson who made 37. Raval hit five boundaries in his 120-ball knock.
Resuming at 56-1 New Zealand had pinned hopes on their skipper Williamson. But it was Raval who smashed two boundaries and then took a single off Mohammad Abbas to take New Zealand into the lead.
But just 12 runs into the lead Williamson was bowled by leg-spinner Yasir Shah to a ball that beat the batsman´s push and removed the bail.