National Rail said the incident, near Havant at about 1pm, meant the power had to be turned off and trains were briefly unable to run in the area.
It added that despite the route now being reopened, some trains may be diverted via Fareham and disruption is expected until about 3.30pm.