It levelled the series at 1-1 and forced today's decider at Sydney Cricket Ground. South Africa won the first game on Friday by six runs.
Gilchrist, promoted from the middle order to open the batting, blasted 100 off 104 balls as Australia overhauled South Africa's total of 228 for six with more than eight overs left. Australia finished on 229 for three to record their first win over South Africa in a limited-overs match this season.
South Africa were always in trouble and it was only through their captain Hansie Cronje (73) and middle-order batsman Jonty Rhodes (82 not out) that they were able to make a respectable total.