The glass transition is a long-standing unsolved problem in materials science. For polymers, our understanding of glass formation is particularly poor because of the added complexity of chain connectivity and flexibility; structural relaxation of polymers thus involves a complex interplay between intramolecular and intermolecular cooperativity. Here, we study how the glass-transition temperature Tg varies with molecular weight M for different polymer chemistries and chain flexibilities. We find that Tg(M) is controlled by the average mass (or volume) per conformational degree of freedom and that a “local” molecular relaxation (involving a few conformers) controls the larger-scale cooperative α relaxation responsible for Tg. We propose that dynamic facilitation where a local relaxation facilitates adjacent relaxations, leading to hierarchical dynamics, can explain our observations, including logarithmic Tg(M) dependences. Our study provides a new understanding of molecular relaxations and the glass transition in polymers, which paves the way for predictive design of polymers based on monomer-scale metrics