The 6-foot-9 right-hander retired the first eight batters before 5-foot-6 Peter Mooney singled to left. Mooney moved into scoring position by stealing second, but Niemann stranded him by getting Emilio Bonifacio to ground out to second.
Niemann got some help from Sam Fuld in the fifth when Mike Nickeas lined a ball down the left-field line that appeared to going for extra bases. But the Rays left-fielder, who had been nursing a tight right hamstring, sprinted to the line in time to make a sliding catch for the third out.
Fuld led off the bottom of the fifth to a nice ovation. He then slapped a ball to left that Rajai Davis made a diving catch on.
After a leadoff double in the seventh, Ryan Roberts was thrown out by Henry Blanco trying to steal third.
Niemann allowed two hits, struck out three and didn't walk a batter in six innings, lowering his spring ERA to 2.92.
"I felt like it was the best I've thrown the ball all spring," Niemann said. "The last start, the line wasn't very good, but I felt really good about the way I threw the ball. So it was a great one to build off of and carry into the day. It's been a huge building process all spring and I can't be happier about the way it ended up."
A decision on the No. 5 rotation spot -- between Niemann and Roberto Hernandez -- is expected to be made Thursday. Hernandez allowed nine earned runs on Tuesday against the Phillies.
J.A. Happ started for the Blue Jays, making his seventh appearance of the spring. After the left-hander issued a leadoff walk to Sean Rodriguez in the second, Yunel Escobar drilled a ball to right-center field. Rodriguez, who was running with the pitch, scored easily to give the Rays a 1-0 lead. Escobar ended up on third with a triple.
To Happ's credit, he did not allow any further damage in the inning, as he struck out Jose Lobaton, then got Jose Molina and Roberts to ground out to end the inning.
Happ allowed one run on four hits and four walks with four strikeouts in 4 2/3 innings.
Fernando Rodney, in his first outing since winning the World Baseball Classic with the Dominican Republic, pitched a scoreless seventh inning with two strikeouts.
Yates replaced Rodney in the eighth. He gave up a singles to Ryan Langerhans and Nickeas, and an error on the latter allowed Langerhans to score and Nickeas to move to second. After Mooney was hit by a pitch, John Tolisano singled to load the bases.
An error by Kelly Johnson allowed everyone to be safe on Andy Burns' grounder to second, giving the Blue Jays a 2-1 lead. Two batters later, Rasmus hit a long homer to right to make it 6-1. Rasmus has two homers and seven RBIs this spring.
Up next: David Price will make his final spring start at 7:05 p.m. ET on Thursday against the Orioles in Sarasota. The left-hander is expected to pitch four innings in his final tuneup before Tuesday's Opening Day start. Jamey Wright is also scheduled to pitch. The game can be heard live on Gameday Audio.