The 21-year-old left-handed batsman scored 71 for his maiden half-century to guide the home team to 184-8 in their second innings at close on a day when as a left-arm spinner he returned Bangladesh's best innings figures with 7-36.
The home team, seeking their first win against a major Test playing country, led overall by 258 runs with Mashrafe Mortaza (five) and Abdur Razzak (nought) unbeaten at close.
Hasan added 48 for the seventh wicket with Naeem Islam (19) before miscuing a drive off Daniel Vettori, who was the pick of the tourists' bowlers with 4-39.
But by then Hasan's knock had put Bangladesh in the driving seat.
It was Hasan's destructive spin in the morning which wrapped up New Zealand's first innings for 171 in reply to Bangladesh's 245.
Hasan's effort with the ball, which surpassed the previous best innings figures for Bangladesh in all their 54 Tests, gave the home side an invaluable 74-run lead in the first innings.
He erased best innings figures by a Bangladeshi bowler set by another left-armer Enamul Haque with 7-95 against Zimbabwe at Dhaka three years ago.
The tourists now face an uphill task to avoid defeat -- New Zealand have never chased more than 200 in away Tests and five of their top six batsmen are playing for the first time on a sub-continent pitch.
Hasan walked in with Bangladesh in dire straits at 71-5, having lost Zunaed Siddique (six), Rajin Saleh (six), skipper Mohammad Ashraful (nought) and Mehrab Hossain (six) -- all before lunch.
Tamim Iqbal (33) fell after tea, before Hasan and Mushfiqur Rahim (32) added a precious 56 for the sixth wicket to ensure Bangladesh do not spurn a good chance of winning.
Even after Rahim fell, bowled by paceman Iain O'Brien, Hasan continued batting with resolve, hitting two successive boundaries off Kyle Mills to reach his maiden Test fifty and then three in one Jeetan Patel over.
His previous best of 41 not out was also made against New Zealand at Wellington in January this year.
Before Hasan's resolute batting Vettori and off-spinner Patel inflicted telling blows on the home team.
Patel had Saleh leg-before and had first-innings hero Mehrab Hossain caught at mid-on, while Vettori accounted for a woeful Ashraful and a threatening Iqbal.
In the morning Vettori hit an unbeaten 55 for his 17th Test fifty before Hasan dismissed O'Brien for five. New Zealand added just 16 to their overnight total of 155-9.
Their previous lowest against Bangladesh was 357 at Dunedin in January this year.
The second Test starts in Dhaka from October 25.