Australia's women end European drought in World Cup boost
The Danes went ahead in the first minute of the friendly in Viborg on Tuesday but the Matildas hit back with a Caitlin Foord brace and a wonder strike from Katrina Gorry in a nine-minute burst in the second half.
The win followed Australia's 4-1 victory over South Africa in London over the weekend, easing the pressure on embattled coach Tony Gustavsson.
"Internally we really believed in it and I hope now externally, after two good wins, people will see we are on the right trajectory going into World Cup 2023," assistant coach Mel Andreatta told Australian media.
"There's been a lot of work on depth and we're starting to see the fruits of it."
Prior to the European tour, Australia, who will host the World Cup with New Zealand, had a spell of four matches without victory, including a 7-0 thumping away to Spain.
They got off to the worst possible start on Tuesday when Denmark's Karen Holmgaard latched onto a cross in the penalty area and thumped home with the Matildas defence caught napping after the kick-off.
Foord's 66th minute equaliser had a touch of fortune about it, with a fairly innocuous left-foot shot taking a heavy deflection off a defender.
However, Gorry's long-range thunderbolt eight minutes later was pure quality.
With the Danish defence in disarray, Foord finished superbly a minute later with her third goal in two matches.
Gustavsson restored talismanic striker Sam Kerr to the starting side in a rejigged 4-4-2 formation after the Matildas beat South Africa with three up front.
Australia will hope to extend their winning run in home friendlies against Sweden and Thailand next month.