Set a target of 207 runs, lower middle-order batsman Jaker Ali took Bangladesh close with his maiden fifty before Shanaka ended his 34-ball innings of 68 with the third ball of the last over
The two teams will now play three one-day internationals and three T20 games as part of their multi-format series
The visitors finished on 13-2 in their second innings with night watchman Nathan Lyon not out six and opener Usman Khawaja on five
Resuming their first innings on 100-4, 55 runs behind Afghanistan's opening effort, Ireland's middle and lower order dragged them to 263 all out and a 108-run lead
The Twenty20 showpiece, which starts on June 1, is being jointly hosted by the United States and Gayle's native West Indies, where big crowds are expected
New Zealand are looking for a first Test victory over Australia since 2011 and came into the two-match series on the back of a 2-0 sweep against South Africa this month
Conway will miss Thursday's opener in Wellington after hurting his left thumb in a Twenty20 defeat to Australia on Friday in Auckland
Loftie-Eaton smashed 11 fours and eight sixes before being dismissed for 101 from 36 deliveries
Wagner fought back tears as he told reporters he had decided to call time on a 64-Test career after New Zealand Cricket
Leg-spinner Adam Zampa knocked over the middle order to finish with 4-34 as the home side were skittled for 102 in 17 overs at Eden Park