In a Sunday contest featuring several lead changes, the Demons did just enough in the fourth quarter to claim an 18.6 (114) to 16.9 (105) victory.
After a four-goal display against Geelong last week, Harrison Petty kicked three majors including a crucial after-the-siren effort at the end of the third quarter, while Jacob van Rooyen also kicked three for the visitors.
Veteran ruckman Max Gawn was huge for the Demons, notching 25 disposals, 10 marks, 33 hit-outs and nine clearances.
After last weekend's loss to the Cats, Demons coach Steven King was thrilled by his team's ability to find a way to victory ahead of the clash with the Dockers.
"We've already played them once earlier this year, and we got taught a lesson," King said.
"This time we'll be at the MCG and we love playing there but I'm sure they'll come over as a full dress rehearsal for what's in front of them as a footy club.
"It's a privilege to play in big games that count, and we're lucky we grabbed our opportunity today and can still be relevant in this competition for what's ahead."
Jed Walter kicked three for the Suns, all in the first half, as Gold Coast were unable to prevent slumping to their 10th straight defeat in what was Christian Petracca's first match against his former club.
Petracca, whose impact at the Suns had been under the spotlight throughout the week following an on-field argument with young gun Leo Lombard in the loss to Carlton, had minimal impact on the contest with 16 disposals and two clearances.
Instead it was John Noble (34 disposals, seven tackles, 10 marks) and Matt Rowell (30 disposals, nine tackles, eight clearances) who led the way for the Suns, with coach Damien Hardwick lamenting a similar display to previous defeats.
"It's just frustrating because a lot of those things are absolutely within our control, and it's the stuff that we need to eradicate," Hardwick said.
"I've got to coach harder and tougher because otherwise we don't move forward.
"So we've learned a lot of lessons like that this year, unfortunately, but not getting the result we're after."
Both teams had injury worries with Sam Collins (ribs) and Blake Howes (wrist) sent to hospital for X-rays after coming off in separate incidents.
Melbourne set the template for their accuracy in front of goal early, kicking five straight in the opening term to hold a three-point lead at the first break.
Bailey Humphrey's goal after the siren at the end of the second quarter, despite a question mark over whether he ran off the line of the mark as he came into kick, had the hosts in front heading into the main break.
And the Suns extended that lead to three goals during a high-scoring third term, kicking four goals alone from free kicks.
The Demons, however, kicked two goals in the last 30 seconds including another after-the-siren major to Petty to snatch a one-point lead heading into the final quarter.
Howes' nasty looking fall early in the last term didn't deter the Demons, who kicked four goals to three to secure the points.
While the Demons host the Dockers next weekend, the Suns will aim to snap their losing run in Canberra against GWS.