The Mariners carried a 1-0 lead into the ninth after Hisashi Iwakuma tossed an eight-inning gem, limiting the Rays to just four hits while striking out five. Fernando Rodney (1-2) eyed the save but did not have his best stuff, serving up the game-tying home run to David DeJesus to start the frame.
After Rodney retired the next two batters, James Loney and Desmond Jennings had consecutive singles for Joyce, who looped a 1-0 offering into center to plate the winning run. Rodney then walked Yunel Escobar and was replaced by Danny Farquhar, who fanned Ryan Hanigan on three pitches to leave the bases loaded.
David Price (4-3), who had thrown 97 pitches through eight, toed the slab for his ninth inning of work after the heroics in the top of the frame and struck out two in a 1-2-3 stanza to secure the win.
Price fanned 12 in total and allowed just a run on six hits in his second complete-game of the season.
Joyce had three hits and DeJesus had two for Tampa, which had lost six of seven entering Tuesday's matchup.
James Jones doubled to start the home half of the first inning and scored on a pair of grounders. Stephen Romero moved him to third and Robinson Cano plated the speedy center fielder for an early 1-0 lead.
Cano and Dustin Ackley had two hits apiece for the Mariners, who failed to put another run across.