Dunivant's tally in the 61st minute came when he headed in a David Beckham corner kick.
Portland argued goalkeeper Troy Perkins had been interfered with on the play, but the tally was allowed to stand and the Galaxy (4-8-2) hung on to notch their first win since April 21.
The Timbers (3-6-4), meanwhile, suffered their first loss since April 28.
They remain tied with FC Dallas for last place in the Western Conference, while the Galaxy climbed out of the cellar.
LGBT community has 'bullied the American people': Bachmann
Duggar sisters unveil Christian dating rules in new book