Massachusetts General Hospital was ranked the No. 5 hospital in the nation, moving up a spot from its ranking last year by U.S. News & World Report.