"Whether it was a fierce throw or not, I tried my hardest in the last throw and it worked".
American Joe Kovacs' appeal against a red flag for overstepping in the final round, when he threw an effort big enough to win, has been thrown out.
"I am happy to get on the podium, of course, but I was ready to come back for the gold", he said.
Croatia's Stipe Zunic took the bronze with 21.46m whilst there was a crushing disappointment for Olympic champion Ryan Crouser, who could finish only sixth with 21.20m.
Walsh consolidated his lead with his third effort recording a mark of 21.75m but things weren't going well for Crouser, who slipped to fifth by the third round.
It was ruled as a foul, however, with Crouser adjudged to have put his foot on the top of the throwing circle perimeter.
The pressure increased on Crouser as his fourth throw also resulted in a foul and he went into the sixth and final round in sixth spot.
The 20-year-old had a disrupted build-up to the world champs, due to an Achilles tendon injury, and had to shorten her run-up to compensate.