Wilson Ramos’ go-ahead two-run homer as part of a seven-run fifth inning helped the Rays rally for a 9-6 victory Thursday night at Yankee Stadium, averting a series sweep while all but nixing the Yankees’ hopes of securing the American League East title.