The official website for The Settlers of Catan

Question about Base Game Roads - May the roads I build “go through” other players’ settlements and cities?

Answer

No. If you build a new road, it must always connect to one of your own roads, settlements, or cities.

alt
In the situation depicted above, the blue player would not be connecting his road piece to his own road but to the red player's settlement, which the rule prohibits. Therefore, only the red player may continue to build behind the red settlement.