Bending horizontal bars of Iron fence
The easiest way to straighten he metal pipe is to heat it with a Mapp gas torch. Apply the flame to the crimped pipe end until it begins to glow orange.
Slowly and steadily push the free end back into position. You may have to push the pipe past it's final position so as to compensate for it springing back slighly.