Raul Ruidiaz and Jordan Morris also scored for the Sounders (13-8-7, 46 points), who moved into second place in the Western Conference.
Zlatan Ibrahimovic, Uriel Antuna and Jorgen Skjelvik scored for the Galaxy (13-12-3, 42 points), who rallied to tie the score after trailing 2-0 and 3-2.
Roldan, positioned near the right post, took a cross from Brad Smith on the deciding goal and hammered a shot from about 2 yards out past Galaxy goalkeeper David Bingham. Morris also got an assist on the play.
It was a wild finish, with five goals scored in the final 24 minutes.
Ruidiaz scored in first-half stoppage time off an assist from Nicolas Lodeiro to give the Sounders a 1-0 halftime lead.
Roldan made it 2-0 with an unassisted goal in the 55th minute, corralling a corner-kick clearance at the top of the 18-yard box before dribbling past one defender and unleashing a left-footed, 15-yard shot into the right side of the net.
The Galaxy got on the board in the 66th minute as Ibrahimovic headed home a corner kick, his 23rd goal of the season and his 45th in 50 career MLS matches.
Antuna tied it in the 75th minute. Ibrahimovic's through ball deflected off teammate Cristian Pavon and straight to Antuna, whose shot from the top left of the 6-yard box beat Sounders goalie Stefan Frei.
Morris scored two minutes later on a breakaway off a pass from Ruidiaz as the Sounders regained a 3-2 lead.
Los Angeles tied it in the 81st minute as Skjelvik got behind the Seattle defense after a pass from Diego Polenta and scored his first career goal in 50 MLS matches.
Frei made six saves for the Sounders, and Bingham had two for the Galaxy.
Sounders outlast Galaxy in 7-goal thriller
Cristian Roldan's 89th-minute goal put Seattle ahead for good as they jumped into second place in the West with a 4-3 victory over the LA Galaxy.