In addition to Emanuel's answer:
What might make this a bit harder for English speakers is the fact that in English, "must" is not a normal verb that can be put into perfect tense, and the replacement is, of all verbs, "to have to".
Danach bin ich ganz allein gewesen und [ich] habe gehen müssen, als es zu schlimm geworden ist.
Afterwards, I was all alone, and I had to leave when it became too bad.
To help you analyze the part "Ich habe gehen müssen", I'm going to build it up step by step:
Ich gehe.
with müssen: Ich muss gehen.
set to perfect tense, southern style: Ich habe gehen gemusst.
Hochdeutsch, with Ersatzinfinitiv: Ich habe gehen müssen.