Sabbir Rahman brought up his fourth ODI half-century on route a 90-run stand with Tamim Iqbal.
Tamim Iqbal scored his 35th one-day fifty.
Lakmal struck early to give Sri Lanka the breakthrough, sending back Soumya Sarkar.
Gunaratne got Sri Lanka back into the contest after skipper Tharanga plucked out a brilliant catch at short extra cover to send back Sabbir.
After Sabbir 's wicket, Mushfiqur Rahim departed for 1 in the next over.
Tamim Iqbal scored his eighth ODI century to take Bangladesh to a strong total.
Mehedi Hasan was rewarded for some skilled bowling on debut as he picked up Kusal Mendis cheaply.
Dinesh Chandimal resisted Bangladesh's attack with a valiant half-century, but Sri Lanka lost wickets at regular intervals.
Thisara Perera kept Bangaldesh at bay with a brilliant 35-ball 55, but it was too much for him to do as Sri lanka were bowled out for 234, handing Bangladesh a 90-run win. And a series lead.
Sachith Pathirana added valuable runs lower down the order, but it was too much to ask with the top and middle order failing in a steep chase.