WASHINGTON—The Senate passed legislation Thursday banning workplace discrimination against gay, lesbian, bisexual and transgender workers, nearly two decades after a push for such protection began in Congress.

Supporters hailed Thursday's bipartisan 64-32 vote as a civil-rights milestone, but opponents said the measure could generate costly litigation for employers. Resistance in the GOP-controlled House is expected to bring the bill's momentum to a halt.

...