The Giants won with only five hits off Willis (15-8), who pitched eight innings but failed in his bid to tie for the major-league lead in victories. The Oakland, Calif. native fell to 0-3 lifetime against the Giants in five starts with an ERA of 7.83.
Lowry (8-11), who hasn't allowed a run in his past two starts, gave up just four hits and walked three.
"I had four pitches working for strikes," he said. "And I made big pitches when I needed to."
He also went 2-for-3, hiking his average to .289.
San Francisco's Jeremy Accardo, recalled before the game from Triple-A Fresno, replaced Lowry with two on and one out in the eighth. He needed just one pitch to escape the jam when Miguel Cabrera grounded a sinker into a double play.
"I tried to do too much," Cabrera said. "I swung too hard."
Accardo, who arrived in Miami at noon after a 12-hour trip from Fresno, was surprised to be summoned from the bullpen by manager Felipe Alou.
"Running out there, I felt a little nervous," Accardo said. "Noah pitched his rear off, and I didn't want to mess that up."
Tyler Walker pitched a perfect ninth for his 21st save in 26 chances, and the Giants won for the seventh time in their past eight games in Miami.
The Marlins began the night three games behind NL wild-card leader Houston.
"Hopefully down the stretch we'll be able to pull out games like that," Willis said. "You'll look back, and if you lose the wild card, you'll think about these games and how they could have turned the season around."
Winn, acquired July 30 from Seattle, provided the winning margin with a home run for the second game in a row. On Thursday, Winn hit his first homer since joining the Giants to score two runs off Tim Hudson and help beat Atlanta.
This time he pulled a fastball from Willis over the scoreboard in left field.
"He had been getting me out with fastballs all night," Winn said. "I was able to get one over the plate."
Florida, which came into the game leading the National League in batting against left-handers, advanced four runners to scoring position against lefty Lowry. Each time the Giants escaped.
Lowry, 24, allowed only one hit in seven shutout innings in his last start Saturday, a victory over Houston. He has an ERA of 1.63 in six starts since the All-Star break, and his eight wins this season are a career high.
"He's going to be some kind of pitcher," Alou said. "He's a fearless man. I was going to say kid, but he's a man."
Florida's Juan Pierre was hit by a pitch to start the first inning, but he was thrown out trying to steal. Lowry then retired 11 consecutive batters before Jeff Conine and Juan Encarnacion singled to start the fifth. Lowry pitched out of the jam by retiring Mike Lowell, Alex Gonzalez and Willis.
Pinch-hitter Chris Aguila hooked a potential homer several feet foul leading off the Florida eighth.
"When it went off his bat, I thought it was a home run," Lowry said.
The Marlins, still without injured first baseman Carlos Delgado and catcher Paul Lo Duca, have totaled eight hits in the past two games, each a defeat. Both players may rejoin the lineup this weekend.
- Florida 2B Luis Castillo came into the game leading the majors with a batting average of .433 against lefties, but he went 0-for-3 off Lowry.
- The Giants improved to 2-2 on their season-high 13-game trip.
- Conine argued when he struck out in the ninth and was ejected by plate umpire Mike Everitt. Manager Jack McKeon protested Conine's ejection. "He said a word," McKeon said. "I said (to the umpire), `Gee, that's common today.' And then all the fans hollered the same thing. I said, `See?"'