The United States was staring down the barrel of a holiday-period government shutdown Thursday as a late-hour intervention by Donald Trump and Elon Musk threatened efforts in Congress to keep the lights on through the New Year.