Just four years after surrendering power, Republicans recaptured control of the House and made gains in the Senate on Tuesday night, in a major rebuff of President Obama and the Democrats by an electorate worried about the economy and the size of the government.