Gilly, who will retire from international cricket at the conclusion of the series, smashed 118 from 132 balls with nine fours and three sixes in his final knock in Perth.
But Australia, which at one point was cruising at 171/2 in the 37th over, lost its way, losing its last eight wickets for just 65 runs in the last 10 overs to allow the tourists back into the hunt on a good batting wicket.
Paceman Lasith Malinga starred with the ball, claiming 4/47 to help bowl Australia out in 49.4 overs.
Australia, electing to bat , lost Matthew Hayden (four) early before Gilchrist and Ricky Ponting (25) steadied innings with 50-run second-wicket stand.
Gilchrist played an untypical but the need-of-the-hour innings en route to his 16 ODI century. He was in superb touch from the word go, punishing Malinga with a series of glorious boundaries through the off-side. However he curbed his shot-making instincts when wickets kept tumbling at one end.
Ponting's caught-behind mode of dismissal streak when Aussie skipper edged Chaminda Vaas straight to Mahela Jayawardene at slip, reducing Australia to 2-66 in the 13th over.
Clarke joined Gilly in the middle and consolidated the Aussie innings with 105-run stand for the third wicket. The duo paced up their innings nicely milking the ball in the gaps for singles and twos and odd boundaries.
Gilly belted Kulasekara for six in the 18th over to notch his half-century, before smashing Kulasekara for consecutive boundaries two overs later as Australia raced past 100 in the 21st over.
Clarke lost his focus when he took a blow on ribs off a scroching bouncer from Malinga. Pup fell seven runs shy of a half-century when a beauty of a doosra from Murali drew him out of the crease and Sangakkara did the rest.
Andrew Symonds (four) followed next over, reducing Australia to 177/4.
Gilchrist tempered his game as he entered the 90s, peeling off singles as he crept to 99, before reaching the ton in the 39th over with a single to long-on.
Chamara Kapugedera gifted Gilchrist a life on 117 when he dropped a simple chance at deep mid-wicket, but Gilchrist managed just one more run before the same fielder made amends next over when he held on to one.
And from there it was Malinga, who stole the show with sheer pace and bouncers targetting the rib-cage of Aussie batsmen, along with Kulasekara cleaned up the hosts' middle and lower order.
Australia 236 all out in 49.4 overs (Gilchrist 118, Clarke 43, Hussey 25; Malinga 4/47) Vs Sri Lanka.