As WW2 wore on, there was an increasing need for metal to make bombs, planes and tanks. To this end, the gates and railings around parks and open spaces were reclaimed as part of the war effort. Likewise railings outside private houses were culled, (although there was a suspicion that upper-class areas were exempted).
Whether the metal was really useful has been debated, and there were rumours at the time that tons of the stuff couldn't be used and were dumped in the Thames Estuary. There's also a suggestion that the factories were over-supplied with iron, but the destruction continued because its effect was to raise the population's awareness of the extreme effort required to fight the war.
The initiator of this metal collecting project was Lord Beaverbrook who was the Minister of Supply 1941-42. As he was also a newspaper publisher he would have been well aware of the propaganda value.
For more information see the excellent London Gardens Trust.
Credit for this entry to: Alan Patient of www.plaquesoflondon.co.uk