The game finished just before 1 a.m. EDT after rain disrupted the action in the ninth inning.
Florida broke a second-place tie with Atlanta in the National League East and moved within 5 1/2 games of division-leading Philadelphia.
Florida had a 1-0 lead going into the seventh before striking against starter Javier Vazquez (10-9).
Hermida opened the inning with his 13th homer of the year. Wes Helms followed with a double and went to third on a sacrifice.
Ross Gload drove in Helms with a two-out single, and Ramirez came through with a two-run homer.
Adam LaRoche brought the Braves within two with a three-run homer in the bottom of the seventh. But the Marlins retired nine of the last 10 Atlanta batters to preserve the victory.
Winning pitcher Anibal Sanchez (2-4) allowed a run on two hits over six-plus innings. Leo Nunez worked the ninth for his 14th save.
Copyright 2009 by United Press International.