Gallardo's pinch-hit in 10th, Brewers beat Orioles