Atlanta has won five of its last seven games to inch in front in the race for the National League's No. 1 wild-card berth.
Logan Forsythe gave San Diego its only run in the third with a homer, but Uggla struck the game's key blow in the third off Edinson Volquez (7-9).
Atlanta scored three more runs in the fourth, two of them coming in on a double by Jason Heyward.
Paul Maholm (11-7) worked seven innings to get the win, allowing Forsythe's homer and four other hits while striking out seven.
Volquez surrendered six runs on seven hits in only 3 2/3 innings. He has allowed 21 runs in his last 13 2/3 innings over four appearances.
San Diego has lost three of its last four.