Gordon struck a powerful header from 14 yards off Steven Beitashour's long, looping pass in the 67th minute, beating Portland goalkeeper Troy Perkins to the back post.
Kenny Cooper tapped in a low cross from Jorge Perlaza to put Portland (7-10-5) ahead in the 23rd minute, but the Timbers couldn't make it stand up for their second road win in three matches.
San Jose (5-8-10) saw its franchise-record winless streak extended to 10 matches (0-4-6), although the Earthquakes avoided being shut out for the eighth time in those contests.
Gordon, acquired from Toronto FC on July 14 as part of a four-player trade, was playing only his second match for the Earthquakes due to strained right quadriceps. He came off the bench in the 56th minute as San Jose searched desperately for an offensive spark.
It didn't take long to find one. Gordon cut inside Portland center back Eric Brunner to reach Beitashour's cross, and his header left Perkins with no chance to stop it.
San Jose goalkeeper Jon Busch was equally helpless on Cooper's goal, his first since April. Perlaza used a well-timed run to burst down the right flank, and Cooper slipped through a discombobulated Earthquakes defense to touch the ball home at the top of the 6-yard box.
It was the fourth goal of the season for Cooper, who has played every match for the expansion Timbers but was recently dropped from the starting lineup for five straight matches due to a lack of production.