Crewe raised the bar in front of their new manager David Artell, taking a first-half lead through skipper Ryan Lowe's ninth goal of the season.
Charlie Kirk should have done better when well placed on the left of the box early on, only to drag his finish past the far post, while Guthrie was also left to rue skying a close-range header over after getting on the end of a teasing free-kick from George Cooper.
Crewe took a deserved lead in the 28th minute when Lowe was slipped clear by Alex Kiwomya, the 38-year-old veteran finding the far corner as he scored in the league for the first time since also netting against Luton at Kenilworth Road in October.
But the impressive Marriott had Luton back on terms on the stroke of half-time, as the striker's shot from a tight angle managed to evade Garratt's clutches and slip in at the near post.
Nathan Jones' side looked to be up against it when they were reduced to 10 men eight minutes after the break after full-back Alan Sheehan caught Danny Hollands to earn his second booking.
But Crewe were undone when Marriott cut infield to force a save from Garratt and Danny Hylton kept the attack alive to pull the ball back from the by-line for Gray to sidefoot home the winner.
Report supplied by the Press Association.
Match ends, Crewe Alexandra 1, Luton Town 2.
Second Half ends, Crewe Alexandra 1, Luton Town 2.
Attempt missed. Callum Saunders (Crewe Alexandra) header from the centre of the box is just a bit too high following a corner.
Corner,  Crewe Alexandra. Conceded by James Justin.
Corner,  Crewe Alexandra. Conceded by John Mullins.
Corner,  Crewe Alexandra. Conceded by Jack Senior.
Attempt missed. Ryan Lowe (Crewe Alexandra) right footed shot from the right side of the six yard box is close, but misses to the right.
Hand ball by Callum Saunders (Crewe Alexandra).
Attempt missed. Alex Kiwomya (Crewe Alexandra) right footed shot from outside the box is close, but misses the top right corner.
Corner,  Crewe Alexandra. Conceded by Jack Senior.
Substitution, Luton Town. Isaac Vassell replaces Jack Marriott.
Substitution, Crewe Alexandra. Ryan Wintle replaces Danny Hollands.
Attempt missed. Callum Saunders (Crewe Alexandra) header from the left side of the six yard box is close, but misses to the left.
Corner,  Luton Town. Conceded by Jon Guthrie.
Corner,  Luton Town. Conceded by Alex Kiwomya.
James Jones (Crewe Alexandra) is shown the yellow card for a bad foul.
Corner,  Luton Town. Conceded by James Jones.
Pelly Ruddock (Luton Town) wins a free kick in the attacking half.
Foul by James Jones (Crewe Alexandra).
Attempt saved. Jack Marriott (Luton Town) left footed shot from the centre of the box is saved in the centre of the goal.
Attempt missed. James Jones (Crewe Alexandra) right footed shot from outside the box is close, but misses to the left.
Substitution, Crewe Alexandra. Callum Saunders replaces Zoumana Bakayogo.
Attempt missed. Danny Hollands (Crewe Alexandra) header from the right side of the six yard box is close, but misses to the right following a corner.
Corner,  Crewe Alexandra. Conceded by Jake Gray.
Attempt blocked. George Cooper (Crewe Alexandra) left footed shot from outside the box is blocked.
Attempt missed. Danny Hylton (Luton Town) right footed shot from outside the box is high and wide to the right.
Goal!  Crewe Alexandra 1, Luton Town 2. Jake Gray (Luton Town) right footed shot from very close range to the bottom left corner. Assisted by Danny Hylton.
Attempt saved. Jack Marriott (Luton Town) right footed shot from outside the box is saved in the bottom right corner.
Corner,  Crewe Alexandra. Conceded by Jack Senior.
James Justin (Luton Town) wins a free kick in the attacking half.
Foul by Alex Kiwomya (Crewe Alexandra).
Attempt missed. Scott Cuthbert (Luton Town) header from the centre of the box is close, but misses to the right following a set piece situation.
Substitution, Crewe Alexandra. Chris Dagnall replaces Charlie Kirk.
Pelly Ruddock (Luton Town) wins a free kick in the attacking half.
Foul by George Cooper (Crewe Alexandra).
Attempt missed. George Ray (Crewe Alexandra) right footed shot from the centre of the box is just a bit too high following a set piece situation.
Foul by Jonathan Smith (Luton Town).
Oliver Turton (Crewe Alexandra) wins a free kick in the defensive half.
Substitution, Luton Town. Jack Senior replaces Lawson D'Ath.
Substitution, Luton Town. Jonathan Smith replaces Jordan Cook.
Goals from Jack Marriott and Jake Gray earned 10-man Luton a 2-1 comeback win at Crewe.