Captain Cook was dismissed for a painstaking 105 off the last ball of the day at the Kensington Oval.
His determined innings, compiled with exceptional care over 315 minutes and occupying 266 deliveries, was also the 100th Test century scored on the Caribbean's oldest international ground, dating back to the first-ever Test match in the region, against England in 1930.
Having seen his side reduced to 38 for three in the morning session after winning the toss and choosing to bat, Cook displayed great resolve, stroking 12 boundaries on a pitch offering some encouragement to the faster bowlers.
That partnership ended when Ali was run out for 58 for the second time in as many innings in the series.
Also Read
"It was great to see Cooky get that hundred. You saw how much it meant to him, the team and the fans," said Ali in reflecting on his captain's vital innings.
"If we can get a few more runs from the lower-order and get to 350 on the second day, then we've got a chance because there is something here for the spinners and I'm looking forward to bowling on this pitch."
However an on-driven boundary off the same bowler took him to the landmark, only for a careless shot in the final over of the day to bring about his demise via a catch to wicketkeeper Denesh Ramdin off part-time off-spinner Marlon Samuels.