The Republican Party has made gains in the Senate and secured a majority for the first time in four years.