WASHINGTON—The House passed an appropriations bill on Wednesday that increases military spending for the next fiscal year and keeps the government open through Dec. 7, leaving the legislation in President Trump’s hands days before funding expires on Oct. 1.

The president Wednesday dismissed concerns that a budget dispute would lead to a shutdown. “We’re going to keep the government open,” Mr. Trump said.

The...