She ran to the station so as not to miss the train.

Literal

She [topic-は] that train [to-に] miss-board [if-then-bad-といけない] [because-ので], station [until-まで] ran.

~といけない expresses 'it would be bad if X' — a soft motivator for prevention. Combined with ので ('because'), the structure says 'because it would be bad if she missed the train, she ran.' 乗り遅れる is a compound verb literally 'board-late' — Japanese builds many transit verbs this way (乗り換える 'transfer,' 乗り過ごす 'miss one's stop,' 乗り込む 'board'). まで ('until') marks the endpoint of the running. Catching trains by sprinting is a familiar Japanese commuter image, captured in the famous 駆け込み乗車 ('rushing-in boarding') warnings on station platforms.