The Senate passed a major funding package Monday night that is likely to bring to an end the longest partial government shutdown in history.