"It's a pretty cool feeling," Forsythe said. "It's always going to be special when you get a walk-off win. It felt nice to be the guy to do it."
Forsythe hit a 1-0 pitch from Steve Edlefsen (0-1) into the second deck in left field to give the Padres the win and snap the Giants' four-game winning streak."
"It felt pretty good off the bat. I was just trying to get on base for the guys. Luckily, it got out," he said.
Manager Bud Black was pleased for Forsythe, who had foot surgery during spring training and just came off the 60-day disabled list Sunday.
"That ball was crushed," Black said. "You could tell right off the bat. Great sound, right trajectory. Great swing. That was good to see. We've brought him back after the surgery and he's stepped right in and really given us a lift. He really didn't have a spring training or an April, so it's good to get him going."
Forsythe said the injury was frustrating.
"I put a lot of work in, had a lot of guys help me get back to where I am right now. I'm just trying to stay consistent with that."
San Diego's Carlos Quentin hit his first two home runs at Petco Park, giving him five since coming off the disabled list last week.
Lincecum is winless in seven starts, including three no-decisions and four losses. The Giants had rallied from a 4-0 deficit to take a 5-4 lead in the seventh, when Lincecum was lifted for pinch-hitter Aubrey Huff. Brandon Crawford singled to center, stole second and scored the go-ahead run on Theriot's two-out single to right.
The Padres had runners on first and second with no outs in the seventh before former teammate Clay Hensley retired the side, including two strikeouts.
Theriot had three hits and three RBIs, while Gregor Blanco had three hits.
Lincecum allowed four runs and five hits in six innings, struck out eight and walked one. He is 0-4 with three no-decisions and a 5.90 ERA in seven starts since April 28.
The Padres jumped on Lincecum for four runs in the second, including Quentin's leadoff homer to deep left. Chase Headley followed with a double and scored on Everth Cabrera's one-out single. Cameron Maybin had a two-out, broken-bat double with two outs.
"Minus the second inning, when things kind of unraveled, every other inning was pretty good," Lincecum said. "There are still the crooked innings but the innings outside of those have gotten a better."
That lead was gone by the sixth.
Blanco tripled leading off the Giants' third and scored on Theriot's single to left. The Giants then scored three runs in the sixth to tie it. Theriot doubled in Blanco, advanced when Melky Cabrera beat out a bunt for a single and scored on Buster Posey's sacrifice fly. Angel Pagan singled to chase starter Anthony Bass and Brandon Belt greeted hit a sacrifice fly off Andrew Casher.
Bass allowed four runs and seven hits in 5 1/3 innings, struck out four and walked one.
Street was reinstated from the 15-day disabled list Tuesday and RHP Miles Mikolas was optioned to Triple-A Tucson. Street was placed on the DL May 5 with a strained right lat muscle. In two rehabilitation starts for Class-A Lake Elsinore, he posted a 9.00 ERA. Mikolas made his major league debut on May 5. In 13 relief outings he was 1-1 with a 3.29 ERA. ... The three-game series continues Wednesday with a matchup of lefties between San Francisco's Madison Bumgarner (6-4, 3.04) and San Diego's Clayton Richard (2-6, 4.44).