The game was scoreless until the 74th minute when Keaton Parks put the defending MLS champions in front.
Further goals from Gabriel Pereira and a maiden goal by Chris Gloster sent NYCFC up to fifth in the Eastern Conference standings.
Story of the match
Six minutes later, the hosts had their first real chance. Talles Magno headed Santiago Rodriguez's corner against the post and San Jose goalkeeper J.T. Marcinkowski smothered Taty Castellanos' follow-up.
Inside the first minute of the second half, Malte Amundsen crossed for Rodriguez, but he was unable to keep it on target.
The Dane was forced off due to injury in the 56th minute, replaced at left-back by Chris Gloster, who would play a bigger role in the match later on.
Two minutes after that, a well-worked team move ended when Castellanos found Magno and he rounded Marcinkowski to score, but the goal was ruled out for offsides.
Johnson was forced into action as he tipped over a shot from distance by Eric Remedi.
Finally, the breakthrough came with little more than a quarter of an hour left. Parks played the ball to Magno, who continued his run into the box and sent it back to Parks, who fired it into the roof of the net.
Substitute Pereira doubled NYCFC's lead as he picked up the ball on the right inside the penalty area before his curling effort beat Marcinkowski in the bottom corner.
The Boys In Blue should have had a third after an Earthquakes turnover high up the field saw Maxi Moralez play Castellanos in one-on-one, but he fired over the bar.
Two minutes from time, it was three as an inch-perfect diagonal pass by Moralez found Gloster and his low, hard shot beat Marcinkowski to cap off another successful home performance.
Man of the match: Keaton Parks
He scored for the second match in a row to get NYCFC's offensive outburst going. A strong presence in the midfield, his goals add another dimension to his already strong game.