In a race against time, the Republican-led House turned down a funding proposal backed by Trump, exacerbating a looming government shutdown.