With both teams locked in battles for playoff spots, New York's CC Sabathia of New York and Oakland's Jarrod Parker engaged in a pitcher's duel that eventually resulted in extra innings.
Neither starter figured in the decision after they had combined to strike out 18 batters.
Sean Doolittle (1-1) replaced Parker in the ninth and he came out to work the 10th as well in a bid to bring the Athletics their second straight win.
Martin fouled off the first pitch he saw from Doolittle and then hit the next one over the wall in left to extend the Yankees' winning streak to six games.
New York maintained a one-game lead over Baltimore at the top of the American League East. Oakland began the night four games behind Texas in the AL West, but had possession of one of the league's two wild-card spots with less than two weeks remaining in the season.
The Yankees' other run came on a fourth-inning sacrifice fly by Curtis Granderson.
David Robertson (2-7) worked the top of the 10th and became the winning pitcher thanks to Martin's home run.
Celebrity Breakups and divorces of 2014 [PHOTOS]