WASHINGTON—The U.S. budget gap widened to more than $1 trillion in the first 11 months of the fiscal year, the Treasury Department said Thursday, the first time year-to-date deficits have topped that amount in seven years.

Higher spending on the military, rising interest expenses on government debt and weak revenues early in the fiscal year combined to push the deficit up 19% from October through August, compared with the same period a year earlier. Government spending climbed 7%, to $4.1 trillion, outpacing higher federal...