Gilchrist survived a dropped chance from Douglas Hondo and made the best of his opportunity.
The 32-year-old wicketkeeper-batsman recorded his 10th century in his 180th one-day international before he was bowled by Sean Ervine one run short of the Australia record held by Mark Waugh, who hit 173 against West Indies in 2000-01.