The successful vote in the House provided only a faint glimmer of hope that a crisis could be averted before much of the government exhausts its funds at midnight on Friday.