The victory allowed the Whitecaps (8-12-0, 24 points) to draw even with San Jose (6-8-6, 24 points) for the final two playoff spots in the Western Conference.
San Jose controlled the possession by a 61-39 margin, and had more shots, but the Whitecaps had the only statistic that mattered.
Forced to make Portland home because of international travel restrictions during the COVID-19 pandemic, Vancouver has won each of its last two games at Providence Park, home of the Portland Timbers. They are 3-1 overall there, with the one "home" defeat against the Timbers.
The Earthquakes had gone 3-1-1 in their last five matches, which enabled them to move above the playoff line ahead of Vancouver.
San Jose scored first when Cristian Espinoza found Carlos Fierro in the center of the box and he right-footed it to the bottom right corner of the net.
But a spirited second-half effort changed everything, as Vancouver charged to its third victory in four games.
Trailing at halftime, Whitecaps defender Ali Adnan tied the score in the 51st minute when he scored on a 25-yard free kick, left-footing a precise shot into the top left corner.
Six minutes later, Vancouver took the lead. Cristian Dajome drove deep into San Jose territory and slid it across the goal mouth. JT Marcinkowski got a glove on it, but couldn't control it, and Tosaint Ricketts left-footed it from very close range.
San Jose's defense had been playing very well, going 210 minutes without allowing a goal. A 4-0 victory over the struggling Los Angeles Galaxy on Oct. 14 preceded Sunday's 0-0 tie with the Western Conference-leading Seattle Sounders on the road.
Real Salt Lake, which is two points behind the Whitecaps and Earthquakes, played a scoreless draw with Dallas on Saturday, and faces San Jose next week.
--Field Level Media
Whitecaps comeback thanks to Ali Adnan rocket
Vancouver Whitecaps come back from a goal down against San Jose to win 2-1. Watch MLS on ESPN+.