Anderson (4-6) tossed a gem, limiting the Mariners to four hits in 7 2/3 innings without issuing a walk.
The A's lefty bounced back after going 0-4 in his four previous starts.
Daric Barton contributed two hits and scored twice for second-place Oakland, which pulled to within seven games of the Texas Rangers in the American League West with their third win in four games.
Seattle starter Jason Vargas (9-9) was saddled with the defeat, surrendering five runs on seven hits in 4 1/3 innings.
Franklin Gutierrez socked a solo homer among his two hits for the Mariners.