Diego Valeri, Eryk Williamson and Andy Polo also tallied and Yimmi Chara had three assists for the Timbers (10-5-5, 35 points). Portland moved into a second-place tie with the rival Seattle Sounders in the Western Conference, one point behind Sporting Kansas City.
Cristian Pavon scored both goals for the Galaxy (5-11-3, 18 points), who lost for the eighth time in their past nine matches to remain in last place in the conference. Los Angeles is six points back of a playoff spot with three regular-season matches remaining.
Niezgoda scored twice in the opening 19 minutes and Valeri added a penalty kick in the 30th minute as the Timbers built a 3-0 lead by halftime.
The opening goal came in the sixth minute, as Niezgoda took a cross from Jorge Villafana on the left wing and flicked a header from 10 yards out just inside the far post.
The Galaxy nearly tied it three minutes later, but Yony Gonzalez's header off a corner kick rattled off the right post.
Niezgoda made it 2-0 in the 19th minute, redirecting Pablo Bonilla's errant shot into the net with a header.
Valeri's penalty kick came after Los Angeles' Nicholas DePuy was called for a hand ball in the penalty area.
The Galaxy scored just 17 seconds into the second half following a poor clearance by Timbers goalie Steve Clark. Gonzalez intercepted the ball and passed to Sebastian Lletget just inside the top of the penalty area. Lletget's back-heel pass to Pavon set up an easy strike.
Williamson made it 4-1 in the 60th minute, taking a pass from Niezgoda and weaving around a defender before putting a low shot under onrushing Galaxy goalie Jonathan Klinsmann.
Polo tallied in the 74th minute, taking a cross-field pass from Chara and scoring on a sidewinding volley into the far upper corner of the net from 15 yards out.
Pavon capped the scoring in second-half stoppage time.
The Galaxy played without forward Javier "Chicarito" Hernandez, the team's biggest offseason acquisition, who was out with a hamstring injury. Hernandez has one goal in 10 games (seven starts) for LA.