Oakland starter A.J. Griffin (3-2) gave up six hits in a seven-inning effort that came after he had allowed 11 earned runs in his previous two appearances.
The home run by Rosales was his first of the year and came off CC Sabathia (4-3), who allowed two runs on eight hits in six innings. The other Oakland run came on an RBI single from Derek Norris in the sixth.
Oakland's win came in the opener of the A's season-long, 10-game road trip. Oakland has won four of its last five contests.
New York had won its previous two games and Friday's contest was the 1,000th as manager for the Yankees' Joe Giardi.
Megyn Kelly: Santa Claus and Jesus are both white men
Video of Victoria’s Secret models trying to 'twerk' hits Instagram