The left-hander hit 11 fours and a six, putting on 67 with Sanath Jayasuriya (31), 63 with Mahela Jayawardene (35) and 51 with Marvan Atapattu (40). Sri Lanka were slowed down by spinner Mohammad Rafique, who took 1-37 off 10 overs, and wickets tumbled late on.
Earlier Bangla skipper Habibul Bashers decision to put Lankans in to bat turned out to be a poor one as Lankan openers scored briskly on a unusually flat Mohali track.
Both left-handers scored heavily in the cover and point regions as they punished Syed Rasel and Farhad Reza's inviting medium pace.
It was a shock when Rasel trapped Jayasuriya leg before but Tharanga continued to play with real authority to record his fifth century in one-day internationals this year off 122 balls.
Jayawardene also went after the bowling, top-edging Reza for six and crashing three other boundaries in the same over, before fetching Razzak from outside off-stump straight into Aftab Ahmed's hands at mid-wicket.
It preceded a period of consolidation in which Razzak and Rafique's spin exercised some control and Kumar Sangakkara's frustration resulted in him holing out off Rafique to Mortaza running round from long-on.
Atapattu, returning after long-term back problems, looked in good nick but was one of three wickets to fall in quick succession in the late dash for runs.
Mortaza finally had some reward when Tharanga slogged and missed at his slower ball, Atapattu was snaffled at wide long-on off Rasel by Reza, who ran out Maharoof for a duck with a smart piece of fielding.
Vaas flipped Razzak to backward square-leg where that man Reza pounced again and Muttiah Muralitharan was run out in comical circumstances after battering Mortaza over his head for a mighty six and being dropped by Reza. Amid all that chaos 28 runs came in the final two overs and the Tigers' valiant efforts in the field look almost certain to prove in vain.
Brief scores:Sri Lanka 302 for 8 in 50 overs ( Tharanga 102, Jayasuriya 31, Jayawardene 35, Atapattu 40; Abdur Razzak 2 for 49, Rasel 2 for 65, Md Rafique 1 for 37) vs Bangladesh