London Fire Brigade (LFB) said it was called at about 11:25 BST after a crane on the lorry hit the bridge in Village Way, North Dulwich.
LFB said no-one was injured and it managed to transfer all 89 passengers on to another train to continue their journeys.
Passenger Paul Coggins said he was trapped on the train for over an hour.
Richard Knighton, from LFB, said: "The lorry has smashed into the bridge and the 'grabber' on top has gone on to the track.
"The train driver has quickly seen it and jumped on the emergency brakes, which has narrowly escaped a potential disaster.
"The track has also been damaged so there was also the possibility of a derailing."
Network Rail said the lorry's crane attachment, which was extended at the time, hit the bridge parapet causing part of it to fall on to the railway.
The rail company said: "Power was cut off to the conductor rail and the train.
"An engineer is on site inspecting the bridge further and should any structural defect be found, then we will have to stop trains for repairs to be made."
A lorry has crashed into a rail bridge that had a passenger train heading towards it.