The House narrowly passes a funding bill to avert a government shutdown, setting the stage for a crucial Senate vote.