Johnson (4-0) struck out eight and walked three to improve to 3-0 with a 2.58 ERA in six starts on the road this season.
The right-hander, who returned July 10 for his first start since undergoing elbow ligament replacement surgery last August, previously pitched a career-high 7 2-3 innings on Aug. 28, 2006, against Milwaukee.
Mike Hampton (2-2) allowed eight hits and three runs, walked two and struck out five in eight innings, his longest outing since April 17, 2005, at Philadelphia.
The Braves have lost 13 of 16.
Hampton, facing the Marlins for the first time since May 3, 2005, dropped to 10-7 with a 4.47 ERA in 24 career appearances (23 starts) against Florida.
Blaine Boyer pitched the ninth, giving up Uggla's homer that ended the scoring.
The Marlins took a 1-0 lead in the third on Wes Helms' RBI single.
In the fifth, Ramirez made it 3-0 with a two-run single. Ramirez, who was hitting just .219 in 96 at-bats this season with runners in scoring position, drove in Uggla and Helms with two outs.
Atlanta made it 3-1 in the fifth when Kelly Johnson tripled and scored on Martin Prado's RBI groundout.
Notes: Braves OF Josh Anderson was called up from Triple-A Richmond to take the roster spot created by Mark Kotsay's trade to Boston. ... Atlanta signed RHP Elmer Dessens, who pitched this year in the Mexican League, for the remainder of the season. ... Ramirez singled to lead off the eighth, but was thrown out 7-6-3-4 trying to advance to second on Brandon Jones' lackadaisical throw from left field.