Walsh threw an impressive 22.29 metres to beat rival American Ryan Crouser by eight centimetres.
The Kiwi was sitting in first position from round one following a first up effort of 21.88m before Crouser moved into top spot with his penultimate throw.
However Walsh took the title with a final throw of 22.29m, which broke the meeting record set in 1991.