China’s push to gain a bigger foothold in U.S. public transit systems could derail in Congress, which is moving to bar the use of federal funds to buy Chinese buses and railcars.

The effort threatens to further fray U.S. trade talks with China, which wants to become a global player in transport and is already fuming over the U.S. decision to blacklist telecommunications giant Huawei Technologies Co.

Advocates...