The hosts reached 173-2 in their second innings at tea on the fourth day, wiping out New Zealand's first innings advantage of 155 runs to lead by 18 runs.
Tamim anchored the innings to reach 60 not out while Mominul provided a counter-punch with an unbeaten 74.
The pair added 118 in their unbroken third wicket stand after Neil Wagner struck twice in the first session to leave the home side struggling on 55-2.
The South African-born left-arm paceman, who claimed 5-64 in the first innings, had opener Anamul Haque caught by Peter Fulton at slip for 22 before adding Marshall Ayub to his tally.
Earlier New Zealand resumed their innings on 419-8 but added just 18 for the last two wickets to be all out for 437.
Ish Sodhi was run out by Mominul for 58, before Abdur Razzak trapped Trent Boult in front to wrap up the innings seven overs into the morning session.