The switch worked as Amir immediately had Raval trapped lbw for two, the first time the rookie New Zealand opener has failed to reach double figures in his two Tests so far.
The hosts are 55 runs ahead with 10 second innings wickets in hand heading into day four at Seddon Park.
Pakistan would have been hoping to get much closer to New Zealand after resuming on 76 for five and things looked promising as overnight batsmen Babar and Sarfraz Ahmed took the score on to 125 before Sarfraz eventually succumbed to Neil Wagner on 41.
The 22-year-old was considered a special talent at age-group level and announced himself on the global stage last month with three consecutive centuries in Pakistan's one-day series against the West Indies.
Taylor finished on 102 not out, with BJ Watling on 15. It has not been a happy Test for Aslam, who dropped Raval twice off Amir in New Zealand's first innings.
The 32-year-old was tested regularly early outside off stump and while a few edges were drawn, none proved costly and he also middled a number of powerful trademark cuts. Ironically, for a team with a history of no-ball problems, it was Pakistan's first recorded discrepancy in that area in the innings. At stumps, New Zealand were 0/0 with just a ball bowled.
However, when seemingly bound for his sixth Test century he fended off a short ball from Wahab Riaz which was caught by the wicket-keeper.
New Zealand started the day at none for one and holding a 55-run lead on the first innings.
Southee said there was no air of complacency in the side, which is 1-0 up in the two-match series and only needs a draw to ensure the first series victory over Pakistan in more than three decades.
Richard Hadlee, Lance Cairns and Ewen Chatfield were too good for the visitors in Auckland while John Reid made an unbeaten 158 in NZ's only innings, while the Dunedin triumph came when Jeremy Coney (111no) and Chatfield (23no) put on a match-winning second innings partnership of 50 after Cairns had to retire hurt after being struck in the head by a bouncer.
Looking to put the match beyond Pakistan, the Kiwis lost two wickets in the afternoon session after losing Jeet Raval in the morning.