The train was so crowded that I stood all the way to Ueno.

Literal

Train [topic-は] very was-crowded so Ueno [until-まで] stood-through.

立ちとおす is a compound verb: 立つ (stand) + とおす (do thoroughly, all the way through) — 'to stand the entire way.' The suffix とおす/通す is a productive way to mark an action as done to completion without interruption.