The Yankees had a four-game winning streak snapped, producing only four hits against four Seattle pitchers.
New York starter Hiroki Kuroda (6-5) retired the first two batters in the decisive fourth inning, but Michael Morse reached on a ground-rule double and both Nick Franklin and Kelly Shoppach walked to load the bases.
Ryan then singled to right to drive in two runs and Bay's base hit to left brought home two more.
Jeremy Bonderman (1-1) earned the win in his second start since being called up from Class AAA Tacoma. He allowed a run on three hits over six innings, after which Yoervis Medina, Charlie Furbush and Tom Wilhelmsen shut down the Yankees.
It was the 15th save for Wilhelmsen.
Millions of Getty images now available for free via embed tool
Boston schools pull out free condoms over wrapping complaints