Gallen (1-2) allowed four earned runs in 2 2/3 innings in his first start back from a sprained pitching elbow.
Giants starter Kevin Gausman (8-1) limited the D-backs to two runs on four hits in eight innings. The right-hander struck out six and walked one.
Curt Casali homered and drove in four runs for San Francisco, finishing a double shy of the cycle. Steven Duggar went 3 for 3 with an RBI double and Mauricio Dubón and Mike Yastrzemski drove in two runs each as the Giants improved the best record in the majors to 44-25.
INDIANS 10, ORIOLES 3
CLEVELAND (AP) — José Ramírez and Bobby Bradley homered during a three-run first inning and Cleveland dealt Baltimore its 19th straight road loss.
The Orioles are approaching the major league record of 23 consecutive road losses, an active streak set by Arizona on Thursday in San Francisco. The 1943 Philadelphia Athletics and 1963 New York Mets lost 22 straight road games.
The win gave Cleveland a four-game sweep and sent Baltimore to its eighth straight loss overall.
Yu Chang had four RBIs with a two-run single in the sixth and a two-run homer in the eighth. Trevor Stephan (1-0) pitched 1 2/3 scoreless innings for his first major league win.
NEW YORK (AP) — Kyle Hendricks flummoxed the Mets for six innings to win his career-best seventh straight start, Javier Báez hit a two-run homer in the first off Marcus Stroman and Chicago beat New York to avoid a four-game series sweep.
Hendricks (9-4) struck out seven and walked two, retiring his last eight batters after consecutive walks in the fourth. Craig Kimbrel got his 19th save in 21 chances, tying for the major league lead.
Stroman (6-5) gave up four hits in seven innings with eight strikeouts and one walk.
New York lost for only the third time in its last 17 home games and is 20-7 at Citi Field.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports