Grim start to golden finale for Ebden at Olympics
Ebden and John Peers came back from a set and break down to defeat fourth-seeded Austin Krajicek and Rajeev Ram of the United States 6-7 (6/8), 7-6 (7/1), 10-8 in the final of the men's doubles.
The success for the 36-year-old Ebden was in brutal contrast to his first round singles loss to Djokovic where he won just one game in a 53-minute thrashing.
"Last night I was actually dreaming of doing an Instagram post... like 'how it started, how it finished'," said Ebden.
"I was thinking about that score, winning one game, and thinking, swipe right and there's a gold medal photo. Maybe I'll have to make that post at some point.
"But I didn't even dream of winning a gold medal."
Doubles specialist Ebden hadn't played a singles match for two years when he received the call-up to face Djokovic following a series of withdrawals from the tournament.
It was a decision condemned by Djokovic, the holder of a record 24 Grand Slam titles, who predictably raced away to victory.
The Serb was 4-0 up in the second set before Ebden even got on the board.
"It's not logical for me that you have someone withdrawing from singles and you call up a doubles player to play singles," said Djokovic.
"I don't think it's a good image for the sport, to be honest."
Ebden, however, on Saturday described the opportunity to face the Serb as "a nice little miracle".
Saturday's win was Australia's second Olympic men's doubles title after Todd Woodbridge and Mark Woodforde triumphed in Atlanta in 1996.
For Peers, it was a second Games medal to go with the bronze he claimed alongside Ashleigh Barty in the mixed doubles in Tokyo three years ago.
US third seeds Taylor Fritz and Tommy Paul claimed the bronze medal with a 6-3, 6-4 win over Tomas Machac and Adam Pavlasek of the Czech Republic.
Machac won gold with Katerina Siniakova in the mixed doubles on Friday.