A strengthening economy drove the nation’s budget deficit to the lowest level of Barack Obama’s presidency, but the improvement has done little to ease the latest fight over federal spending.

The budget shortfall fell to its lowest level since 2007 during the fiscal year that ended Sept. 30, the Treasury Department said Thursday. The deficit declined 9% from the prior year to $439 billion—around 2.5% of gross domestic product and below the average the U.S. has run over the past 40 years.

The...