I got on the wrong train.
'Sbagliato' — zba-LYA-to. Initial 'sb' cluster; the 'gli' sounds like 'ly'.
Say this when you realise after boarding that you are on the wrong line or direction. You can say this to a fellow passenger while deciding what to do.
'Mi sono sbagliato' uses the reflexive passato prossimo of 'sbagliarsi' (to make a mistake). The phrase 'di treno' specifies what you got wrong. You could also say 'ho preso il treno sbagliato' (I took the wrong train) — both are natural.
Ho preso la direzione sbagliata.
I took the wrong direction.
Specifies that the direction was the error.
Devo scendere alla prossima e tornare indietro.
I need to get off at the next stop and go back.
States the solution after realising the mistake.
Dove posso invertire la rotta?
Where can I turn back?
Asks where the best place to reverse direction is.
Making a directional mistake on an Italian metro is very easy for visitors because signs show the terminus name, not a compass direction. Locals navigate by knowing terminus names: 'Battistini' is west on Rome's line A, 'Anagnina' is east.