The Giants' Aaron Rowand hit a two-out solo homer in the ninth against Leo Nunez to tie the game. Dan Uggla's three-run homer with two out in the eighth off Sergio Romo gave the Marlins a 6-5 lead.
Unbeaten Giants ace Tim Lincecum had 13 strikeouts in seven innings and left with a 5-3 lead, but he was denied his fifth win of the season when Florida rallied.
Lincecum was up 3-0 before Hanley Ramirez hit a three-run homer in the sixth. Lincecum's ERA soared to 1.70, but aside from the homer he was in top form, allowing only five hits and one walk.