Each side managed one goal during the first two shootout rounds and San Jose's Antti Niemi then turned aside a spinning backhand attempt by Gustav Nyquist.
Marleau followed by putting a wrist shot through the pads of Jimmy Howard to earn the victory.
San Jose began the night one point behind fourth-place Los Angeles in the battle for home-ice advantage in the opening round of the playoffs.
With each point vital in the post-season race, eighth-place Detroit moved two points in front of Phoenix and three ahead of Dallas and Columbus for the final playoff berth.
Marleau scored shorthanded to put San Jose in front 2:35 into the contest and Justin Abdelkader tied it midway through the second.
The Red Wings took their only lead on Jakub Kindl's power play goal 2:29 into the third, but San Jose came back just 91 seconds later on a score from Logan Couture.
Niemi was credited with 27 saves. Howard stopped 28 shots.
McPhee, Cokas 'working on their marriage' after affair
Ohio bar shooting arrested, charged with murder