Bonner scored an unbeaten 113 and featured in partnerships of 66 with Captain Kraigg Braithwaite, who made 23 and 105 with Kyle Mayers, who scored 52.
The 32-year-old Bonner was also involved with an unbroken stand of 32 with Jason Holder (18) when play was called off in the final hour of play with the West Indies 236 for 4 pursuing 375 for victory.
Bonner, who was 15 overnight, faced 274 balls in his knock that lasted 423 minutes in which time he hit 13 fours and a six.
It was a performance that earned him the Man of the Match Award.
"It's truly special for me. This is my childhood dream and I'm really happy I got this monkey off my back,” said Bonner, who came close to a Test century on two previous occasions when he scored 86 and 90 in two Tests against Bangladesh in January.
Bonner who was dismissed for 31 in the first innings, revealed, however, that scoring his first Test century did not come without challenges.
“The first innings my foot wasn't moving as much as I wanted it too,” he said.
“Sri Lankan bowlers are very disciplined so it was very important to me to stay disciplined and play in the V as much as possible. I think Lakmal was really challenging. All of them are challenging but he was a cut above the rest."
Lakmal who took five wickets in the West Indies first innings of 271, ended without a wicket in the second innings but the pressure he created yielded wickets for his teammates. Vishwa Fernando took 2-73 while Lasith Embuldeniya had 2-62.
Scores in the match: Sri Lanka 169 and 476. West Indies 271 and 236-4.