The Yankees felt the recent loss of veteran closer Mariano Rivera in a big way, wasting eight innings of shutout pitching from starter David Phelps and three relievers.
Rivera was lost for the season last week when he suffered a torn knee ligament while running down fly balls during batting practice.
Robertson, who picked up his first save of the year on Tuesday against the Rays despite walking two in the ninth inning, was called on again and failed to produce.
B.J. Upton, however, lifted a sacrifice fly to right that tied it up and Joyce followed by hitting a 1-2 pitch over the wall in right.
Niemann allowed only a first-inning run on six hits with five strikeouts in seven frames.
The Rays ended a three-game losing streak.
2014: NFL Cheerleaders [PHOTOS]
Arizona Cardinals player formally charged