Emerson Hyndman scored in the 90th minute, and Pity Martinez added an insurance goal in stoppage time for United.
The two late goals helped Atlanta (54 points) move into second place in the Eastern Conference above Philadelphia, which plays Sunday. And it helps soften the potential blow of losing Josef Martinez, who leads United with 26 goals and had his MLS record streak of games with a goal halted at 15 when he exited in the 79th minute.
- Stream MLS games LIVE on ESPN+
- MLS Cup playoffs 2019: All you need to know
Martinez appeared to suffer the injury several minutes before leaving the game. His foot got stuck in the turf after colliding with a teammate, causing his right knee and ankle to buckle awkwardly. He tried to play through it but eventually couldn't, and he departed the sideline on a stretcher, grimacing before putting a towel over his face.
Justin Meram also scored early for the defending MLS Cup champions, who have won eight of their past 11 matches in league play while also capturing the U.S. Open Cup and Campeones Cup.
San Jose (44 points) had tied it in the first half on an attack involving Cristian Espinoza. But Espinoza was then sent off in the 34th minute for receiving his second yellow card. Earthquakes goalkeeper Daniel Vega made nine saves, yet ultimately couldn't prevent his side from closing a three-game road swing without earning a point.
Hyndman scored his first goal in league play since arriving during the secondary transfer window on a counter-attack set up by Darlington Nagbe. After San Jose's defense finally closed on the midfielder, Nagbe spotted Hyndman, whose finish left Vega little chance.
Short-handed San Jose tried to press forward after the restart and were caught on the counter to seal the game, with Brandon Vazquez and Hector Villalba combining to find Pity Martinez wide open in front of goal.
Espinoza helped San Jose tie the game in the 27th minute when he raced onto Vega's punt, rounded his defender and sent a shot that deflected off goalkeeper Brad Guzan and across the goal line. It was officially credited as an own goal from Guzan.
But Espinoza's day ended seven minutes later when referee Chris Penso showed him a second yellow card for stepping on the back of Franco Escobar's leg while trying to win the ball. His previous caution came 18 minutes earlier for not retreating from an Atlanta restart.
Josef Martinez's record streak ends in Atlanta win
Atlanta United managed a 3-1 win over the Earthquakes, but Josef Martinez could not keep his record goal streak going. To watch MLS, sign up for ESPN+.
Columbus stun Atlanta on the road
Gyasi Zardes and the Columbus Crew hand Atlanta United their first home defeat since April with a 3-1 win. To watch MLS sign up to ESPN+.