Storl was trailing favourite Ryan Whiting when he launched an obviously big effort in the fourth round, only for it to be ruled a foul for his foot edging over the edge of the circle.
A long discussion with the judges followed, before a measurement was allowed and it proved well worth the trouble for Storl as his season's-best 21.73 metre effort was enough for gold.
American Whiting could not improve on his opening round 21.57 and had to settle for silver ahead of Canada's Dylan Armstrong who took bronze with 21.34.
Whiting came to Moscow with the four longest throws of the season but his failure to turn that form into gold continues the United States' recent run of failing to deliver in the shot in the biggest competitions.
(Editing by Ed Osmond)
