Taylor was 77 not out for his 23rd fifty to help his team recover from a shaky 79-4 to close the fourth day on 167-6, having an overall lead of 177 with four wickets intact.
Mark Craig (nought) was in Taylor’s company as New Zealand will seek a series-levelling win in the three-Test series on an intriguing final day.
Pakistan won the first Test by 248 runs in Abu Dhabi last week.
Sarfraz’s 112 led Pakistan’s fightback as they managed 393 in their first innings in reply to New Zealand’s 403, conceding a slender 10-run lead.
Pakistani spinners Zulfiqar Babar (3-60) and Yasir Shah (3-65) had jolted New Zealand but Taylor stood firm.
Babar removed Brendon McCullum (45), Kane Williamson (11) and Jimmy Neesham (11) in another display of beguiling left-arm spin on a Dubai stadium pitch which is taking notable turn.
Yasir Shah dismissed Tom Latham (nine), Corey Anderson (nought) and BJ Watling (11).
McCullum hit six fours in his 62-ball knock and when on 39 became New Zealand’s second top Test run-scorer, overhauling Martin Crowe’s 5,444 runs in 77 Tests.
Stephen Fleming is first with 7,172 runs in 111 Tests while McCullum now has 5,451 runs in 89 Tests.
Taylor added 46 with Jimmy Neesham (11) and hit Babar for a boundary to complete his fifty and then added 41 for the sixth with Watling.
– Full circle –
He has so far hit ten fours in his 93-ball knock.
Earlier, Pakistan owed their fightback to Sarfraz who hit a brilliant 112 for his third hundred — all scored this year.
He was last man out in the second over after lunch from McCullum, hitting 16 fours in a 215-minute stay, his innings balancing the match after New Zealand looked set for a big lead.
Sarfraz added a record 81 runs for the tenth wicket stand with Rahat Ali (16 not out).
Sarfraz hit three fours in one Craig over and then two more off leg-spinner Ish Sodhi to come within four runs of his hundred.
He then cut seamer Tim Southee towards deep point for his 15th boundary to complete the three-figure mark off 153 balls, the first Pakistani wicketkeeper-batsman to score three hundreds in a year.
He ran a full circle in jubilation, thumped his bat in the air to warm applause from his team-mates in the dressing room.
Sarfraz said he was delighted to help his team.
“Its nice to score a hundred,” said Sarfraz. “If we can get their last four wickets early then we can chase down the target.”
It was Sarfraz, 28 overnight, who anchored the batting after Pakistan resumed the day on 281-6.
Paceman Tim Southee (3-67) removed Yasir Shah in the third over of the day, caught behind for two and just two runs later Trent Boult (2-69) trapped Ehsan Adil leg-before for nought, leaving Pakistan in danger of conceding a big lead.
But Sarfraz added an invaluable 25 for the ninth wicket with Babar (five) and then frustrated the Kiwis, then bettering the tenth wicket stand record against New Zealand of 65 which Salahuddin Ahmed and Mohammad Farooq set in Rawalpindi in 1965. -AFP