The A's took two of three games from the AL Central leaders, who had swept a three-game set from Oakland in July. Cleveland went into the day with the best record in the American League, but was held to one run for the third consecutive game while being outscored 14-3 in the series.
Khris Davis tripled and scored as part of Oakland's five-run second inning.
Graveman (10-8) extended his scoreless streak to 16 innings before Perez homered in the seventh. Graveman allowed six hits and one run over 6 2/3 innings with two strikeouts and two walks.
Trevor Bauer (9-6) gave up five runs and nine hits over 6 2/3 innings. Bauer, who fanned a career-high 13 in his last start, struck out three.