Treasury officials had said they would run out of money to pay the nation's bills on Thursday unless Congress acted.
The deal suspends the $16.7-trillion limit on the government's debt for several months, giving the Treasury renewed borrowing authority. The measure also will bring hundreds of thousands of federal workers back to work from furloughs.
Less than an hour after the House voted, and even before the president signed the bill, Yosemite National Park announced its roads and public areas would reopen immediately. The park's visitor centers and valley campgrounds will open Thursday.