Harting, 27, draped a German flag around his naked torso and set off on a lap of honour after winning with a throw of 68.27 metres.
On reaching the home straight, Harting proceeded to jump the hurdles laid out for the women's 100h final as an appreciative crowd cheered each time he "cleared" a hurdle.
Harting claimed victory with his fifth-round effort, surpassing Iran's Ehsan Hadadi who had led since the opening round with 68.18. His silver was Iran's first Olympic track and field medal.
Defending champion Gerd Kanter of Estonia won bronze with a best of 68.03.
"It's just amazing. I can't believe it. It was so hard as my beginning was bad. It got better and in the end i was lucky," Harting told reporters.
"I've dreamed of this since I was 12. I first picked up a discus in 2000. From then on I worked hard to get here."
Harting was fourth in the Beijing final in 2008 but became world champion for the first time a year later in Berlin and defended his title last year in Daegu, South Korea.
This season he threw over 70 metres for the first time, a world leading mark of 70.66 in May.
Twice Olympic champion Virgilijus Alekna of Lithuania's bid to secure another podium finish at the age of 40 ended in disappointment as a best of 67.38 left him out of the medals in fourth.
Alekna won gold in 2000 and 2004 and bronze in 2008.