Jason Price grabbed a stoppage-time winner as Millwall won their sixth consecutive game on their travels.
Price, signed on loan from Doncaster Rovers before Thursday's deadline, swooped to keep Kenny Jackett's side in contention for automatic promotion from League One.
The Welshman had replaced leading scorer Neil Harris who broke his nose in a first-half aerial clash.
Millwall just about deserved their narrow success over spirited Crewe who improved after a poor first-half showing and went close late on through man of the match Gylfi Sigurdsson.
A swirling wind and a hard pitch made life difficult for both sides and there were few clear-cut chances in the game.
Harris almost embarrassed home keeper John Ruddy early on before Alex striker Tom Pope turned and forced David Forde to dive to keep out a low shot.
Harris should have put the Londoners in front on 37 minutes when he was offered a free header from James Henry's corner, but glanced wide.
The veteran frontman was then stretchered off, but Millwall kept a tight grip on the game and, when Henry's corner flew across the box, David Martin volleyed onto the underside of the bar.
Crewe substitute Shaun Miller forced Forde to block a volley and then had penalty appeals waved away after clashing with Andy Frampton.
Gary Alexander flashed a volley across the face of goal and Price headed Henry's corner wide when it seemed easier to score.
But the loan signing made it count when Martin's shot ricocheted into his path right at the death and he prodded past Ruddy at the second attempt.
"Jason's an experienced forward who we need in the situation we're in," pointed out Millwall boss Jackett.
Crewe boss Gudjon Thordarson said: "It was cruel to lose the way we did, but that is the business we are in and now we need to deliver."