Asprilla's goal came in the 71st minute, and the Timbers protected the lead.
Niezgoda has scored five goals over the past six matches. The triumph stretched Portland's unbeaten streak to seven (4-0-3).
Benjamin Kikanovic scored a goal for San Jose (5-9-7, 22 points).
- MLS on ESPN+: Stream LIVE games, replays (U.S. only)
- Soccer on ESPN+: FC Daily | Futbol Americas
- Don't have ESPN? Get instant access
Cristian Espinoza nearly tied the match with a right-footed blast in the 89th minute, but Portland goalkeeper Aljaz Ivacic barely deflected it with his fingers, and the shot caromed off the left goal post.
Ivacic made six saves for the Timbers (7-6-9, 30 points). He stopped Cade Cowell's close-range right-footer in the 86th minute prior to thwarting Espinoza.
Portland held a 19-11 edge in shots But San Jose put seven on target to the Timbers' five.
JT Marcinkowski made three saves for the Earthquakes.
Asprilla sent two shots wide and a header over the crossbar in the first half. He finally took advantage of an opportunity in the 71st minute.
San Jose took a 1-0 lead in the 42th minute, the tally coming off a set piece.
Espinoza received a quick pass and smacked a close-range left-footed shot that was stopped by Ivacic. But the rebound went to Kikanovic, who knocked it past Ivacic for his third goal of the campaign.
Portland knotted the score in the 53rd minute, a sequence that began when Diego Chara took a right-footed shot. Niezgoda was directly in line and the ball caromed off his upper right leg and into the net. He was credited with his eighth goal of the season.
The Timbers took nine first-half shots and not a single one was on target. Five of San Jose's seven shots were on net, including a right-footer by Espinoza in the ninth minute that was saved by Ivacic.