A new U.S. trade deal with Mexico and Canada gained backing from House Democrats, setting the agreement on course for likely ratification by Congress in 2020 and marking a victory for President Trump after months of negotiations to modify it.

Mr. Trump ran for office in 2016 on a pledge to remake or blow up the North American Free Trade Agreement, and his administration used a combination of pressure tactics and closed-door negotiations to win support for an amended version of the agreement from Democratic lawmakers, labor...