At the close of play on the second day, Sri Lanka were 375 for five, a lead of 143 runs.
Mahela Jayawardene was unbeaten on 42 after nightwatchman Suranga Lakmal fell for a duck in the last over of the day to off-spinner Sohag Gazi.
Bangladesh pacer Al-Amin was twice unlucky in the morning session when wicketkeeper Mushfiqur Rahim and Shamsur Rehman dropped Silva (139) in quick succession.
In between those two let-offs the opener also edged the same bowler to captain Mushfiqur and received another life because Al-Amin's foot had knocked the bail down at the bowler's end during his delivery stride, prompting a no-ball.
Silva, on his seventh Test appearance, put on 118 for the first wicket with Dimuth Karunaratne (53) who fell to Shakib Al Hasan's left-arm spin.
Sri Lanka did not lose a wicket in the afternoon session as Silva and Kumar Sangakkara (75) pummeled the bowling during a 155-run stand.
Right-hander Silva, 27, who twice went close to his first Test ton during the recent drawn series against Pakistan, had some nervous moments on 98 before he pulled Shakib to the square leg boundary to reach three figures.
Al-Amin was finally rewarded in the final session when he bagged the prize wicket of Sangakkara.
Silva was dropped again on 129 by Mushfiqur off Shakib before the opener was out leg before in the same over after hitting a four and a six off consecutive deliveries.
Jayawardene and Dinesh Chandimal (40) piled on the agony for Bangladesh with a brisk fourth-wicket partnership of 72 before the latter became Shakib's third victim in the penultimate over.
The match is the first in a two-Test series.
Scorecard
Bangladesh (1st innings): 232
Sri Lanka (1st innings): (overnight 60-0)
D. Karunaratne c Robiul b Shakib 53
K. Silva lbw Shakib 139
K. Sangakkara c Nasir b Al-Amin 75
M. Jayawardene not out 42
D. Chandimal b Shakib 40
S. Lakmal c Nasir b Gazi 0
Extras: (b-8, w-12, nb-6) 26
Total: (for 5 wickets) 375
To bat: A. Mathews, K. Vithanage, D. Perera, S. Eranga, R. Herath
Fall of wickets: 1-118, 2-273, 3-302, 4-374, 5-375
Bowling: Robiul 14-1-43-0, Al-Amin 25-2-87-1, Rubel 17-0-74-0, Gazi 16.2-3-44-1, Shakib 27-4-94-3, Mominul 6-0-20-0, Nasir 3-0-5-0.
Image: Kaushal Silva celebrates after scoring his maiden Test hundred
Photograph: Andrew Biraj/Reuters
Pakistan strike early but Sri Lanka extend lead to 220
Sri Lanka well-placed after seamers dismiss Bangladesh cheaply
Ajmal strikes late to check Sri Lanka in final Test
The world versus the BCCI: Who will win?
Jayawardene joins 11,000 Test club