The House on Tuesday passed a measure to extend government funding into December, averting a shutdown in the final stretch of the midterm campaign.