Chasing a target of 203, Bangladesh seemed on course for victory thanks to a composed 77 off 98 balls from captain Nigar Sultana and a solid supporting innings of 64* from Sharmin Akhter.
The pair rebuilt the innings after early setbacks and carried Bangladesh close to the finish line. But with just 8 runs needed from the final over, the game turned on its head.
Chamari Athapaththu, who had earlier scored a quickfire 46, produced a magical over with the ball, dismissing Rabeya Khan, Nahida Akter, Nigar and Marufa Akter in the space of four deliveries.
The stunning sequence saw Bangladesh slump from 193/5 to 194/9, falling agonizingly short at 195/9 in 50 overs.
Earlier, Sri Lanka posted 202 all out in 48.4 overs, anchored by a brilliant 85 off 99 from Hasini Perera, who was later named Player of the Match.
Athapaththu’s attacking 46 set the tone at the top, while Nilakshika Silva added a brisk 37.
For Bangladesh, Shorna Akter shone with the ball, claiming 3 for 27 from her 10 overs, while Rabeya Khan and Nahida chipped in with two and one wicket respectively.