Marcell Ozuna homered in a three-run fourth inning, and Phelps was able to keep the Giants in check, allowing one run in six innings.
Bumgarner struck out 10, including getting Phelps twice. Still, the lefty had his pitch count run up to 99 and he was out of the game after five innings.
"You saw my two at-bats," Phelps said. "He's got nasty stuff. Credit our guys getting his pitch count up early, and getting him out after five. That's huge when you face a pitcher of that caliber.
"When you're facing a guy like that, to get a lead is really awesome. To put up a three-spot was big for me. I really wanted to go out and put up a zero."
Phelps scattered six hits, struck out three and walked one. He worked nicely with rookie catcher J.T. Realmuto, executing the game plan.
"J.T. did a great job back there," Phelps said. "I can't speak highly enough about the job he's done for me. It makes things real easy when you're on the same page as your guy. He's special back there.
"We had a pretty good plan of what we were wanting to do with these guys. We were stubborn with it, and stuck with it. We had some good results with it."
Phelps opened the season in the bullpen, but he filled in the rotation spot when Opening Day starter Henderson Alvarez went on the disabled list on April 13 with right shoulder inflammation. In five starts, Phelps' ERA is 1.80 (six runs in 30 innings).
"When Hendu went down, I'm not going out trying to be an ace," Phelps said. "I'm not trying to take over what he was doing. I'm trying to give us a chance to win every time we go out. That's what I do every time I take the hill. I try to give us a chance to win a ballgame."
Manager Mike Redmond has been impressed with how Phelps simply executes his plan.
"[Since] Hendu went down, he's been tremendous," Redmond said. "He's made some big starts, gone deep into games and won some big games for us. He pitches on the corners. He doesn't give in. He gave us exactly what we needed today."