WASHINGTON—The biggest transformation of the U.S. health system in decades won approval on Capitol Hill late Sunday, the culmination of efforts by generations of Democrats to achieve near-universal health coverage.

Facing...