Ivan Rodriguez was hit by a pitch and Kaz Matsui walked before Pence hit a sharp liner to the right side of the infield. First baseman Adrian Gonzalez dove and just missed stopping it as Rodriguez and Matsui scored.
In his longest outing of the season, Rodriguez (3-2) allowed five hits without issuing a walk. He struck out seven and lowered his ERA to 1.80, third-best in the league.
Chad Gaudin (0-2) went seven innings and allowed two runs on five hits for the Padres.