The Marlins moved within five games of the NL East-leading Phillies and try to complete the three-game sweep with ace Josh Johnson on the mound Sunday.
Before coming to Philly, Florida was swept by the woeful Washington Nationals in a three-game series.
"It shows our team, we fight back and we still have some work to do tomorrow and hopefully we get that," Coghlan said.
Five Marlins relievers held the Phillies to one run over five innings after starter Sean West lasted four innings in his first start since July 11.
Leo Nunez allowed a run in the ninth, before finishing for his 11th save in 14 tries.
"Our division is not over," Phillies manager Charlie Manuel said. "We have a lot of games left."
Hamels (7-7) gave up four runs, five hits and walked four in 5 1/3 innings. Last year's World Series and NLCS MVP, Hamels has battled inconsistency all season. He has a 4.77 ERA.
"He had command problems," Manuel said. "He can look real good at times, but it seems he has an inning or two that don't go good for him."
Hamels declined to speak to reporters after the game.
Called up from Double-A to make the start, West allowed three runs and seven hits. The left-hander left after Ryan Howard led off the bottom of the fifth with a double off the wall in left-center. But Sanches came in and stranded the runner.
"I felt I pitched well tonight," West said. "I take some positives out of it."
Helped by shaky defense, the Phillies took a 3-2 lead in the third. Howard led off with a walk and one out later Raul Ibanez reached when West couldn't field his bouncer near the mound. With two outs, first baseman Nick Johnson dropped Carlos Ruiz's pop-up, allowing Howard to score.
"It's probably going to be on the bloopers, I'm sure," Marlins manager Fredi Gonzalez said of Johnson's miscue.
Philadelphia scored twice in the second to take a 2-1 lead. Hamels dropped a perfect bunt and beat West's high throw to first for an infield single that loaded the bases.
Jimmy Rollins drove in a run with a fielder's choice grounder. Hamels broke up the double play with a hard takeout slide at second. Victorino followed with an RBI single off shortstop Hanley Ramirez's glove, giving the Phillies a 2-1 lead.
Ramirez drove in the tying run with a bases-loaded grounder to second in the third.
- Phillies RHP Chad Durbin (back) will make a rehab appearance at Triple-A Lehigh Valley on Sunday. LHP J.C. Romero experienced tightness in his injured forearm in a rehab appearance Friday night and it's uncertain when he'll pitch next.
- Hamels hasn't beaten the Marlins since Sept. 22, 2006. The Phillies are 1-6 in his last seven starts against Florida.
- Coghlan tied a team record with his seventh straight multihit game. Juan Pierre did it twice and Miguel Cabrera did it once.
- Howard tied a career-high with four hits.