Republicans are leaving town for an August recess after a failed attempt to repeal the Affordable Care Act. When they return in September, they’ll have just 12 working days to avert another big problem.

In a letter to lawmakers Friday, U.S. Treasury Secretary Steven Mnuchin said the federal borrowing limit, or debt ceiling, needed to be raised by Sept. 29 or the government risked running out of money to pay its bills.

The...