Gilchrist clubbed three massive sixes, including two in succession off Sri Lankan spinner Muttiah Muralitharan, to blaze his way to an unbeaten 67 as Australia's batsmen went on the rampage on the second day at Bellerive Oval.
Andrew Symonds also posted a half-century, his second of the series, prompting Ricky Ponting to end Australia's first innings just after tea.
Sri Lanka, who were thrashed by an innings in last week's first Test in Brisbane, captured the wickets of Mike Hussey and Michael Clarke after lunch but were unable to put a halt on Australia's relentless run feast.
Hussey departed for 132 when he was trapped leg before wicket by Dilhara Fernando then Clarke fell for 71 when he was caught by wicketkeeper Prasanna Jayawardene off Lasith Malinga.
Hussey and Clarke had added 125 for the fourth wicket but their dismissals did little to help Sri Lanka's cause as Gilchrist and Symonds made the most of a flat batting pitch that offered the bowlers little assistance.
Gilchrist signalled his intentions when he smacked Malinga over the mid-wicket fence for his first six before tea but saved his best for Muralitharan, who needs just six more wickets to break Shane Warne's world record of 708 test dismissals.
Gilchrist's second six off Muralitharan sailed outside of the Bellerive Oval and into a nearby street, forcing the umpires to call for a replacement ball.
Sri Lanka's bowlers struggled against the Australian batsmen and had to cope without paceman Farveez Maharoof, who suffered a stress fracture in his foot on the opening day.
Hussey also smashed Muralitharan for six before lunch to bring up his 100 partnership with Clarke before the pair fell in quick succession after the first break, allowing Gilchrist and Symonds to chase quick runs and set up the declaration.