A goal from Luke Williams was cancelled out by a Nicky Ajose strike before Miguel Llera won the game for United.
It was the visitors that started the game the better and they could have caught United out in the opening moments of game when a lovely passing move saw Ajose found out wide but his ball was intercepted by Llera and went out for a corner, which was eventually cleared.
Greg Leigh found himself with an opportunity when he managed to keep the ball in play on the far right of the box and move towards goal but his shot was straight at Slocombe from a tight angle.
Ajose was the next to come close for Crewe when they won a free kick just outside of the box but his effort was just wide of the post.
However, despite the early pressure from the away side, it was the Iron that were to take the lead in the tenth minute through Williams.
Paddy Madden was found out wide and cut the ball back to the on-loan Middlesbrough loanee, who made no mistake in side footing the ball past Garratt and into the bottom corner.
Despite the goal, Crewe were still putting United’s defence under pressure and had another opportunity when Ajose turned and ran past Bishop before playing in Ikpeazu, who was about to strike towards goal before a terrific block from Alex Davey saw the ball deflect wide.
Greg Leigh was the next to try his look from distance but Slocombe managed to catch the ball to prevent a corner.
United’s next attack came when Paddy Madden had a good chance to double United’s lead after this when Hawkridge’s cross wasn’t cleared by properly by Ray but his shot was deflected wide of the post.
The visitors deservedly got a reward for their start with half an hour gone when ex-Iron loanee Ajose scored an equaliser.
A good move saw Jamie Ness play in James Baillie and he smashed the ball across goal for Ajose to tap into an empty net.
Ikpeazu was in the thick of things again when he managed to beat three men and make his way into the box but he overran the ball and it was eventually cleared by Brindley.
Lyle Taylor had a good opportunity to restore the Iron’s lead from corner but he headed over the bar from close range.
The Iron had the final chance of the half when a corner was cleared and Williams was found outside the box. He fired hit shot through but Garratt managed to get to it.
It was level at the break but there was no doubt that the visitors had been the better side and manager Mark Robins would have been hoping for much improvement in the second half, with Isaiah Osbourne replacing Taylor at the break.
United had the first chance of the second half when Williams hit a ball into the channel, which Hawkridge managed to keep in and the ball was eventually crossed to O’Neil, who sliced his shot wide from around twenty yards out.
Slocombe was then to thank for the game staying level when a superb free-kick from Ajose looked to be heading straight for the top corner but was brilliantly tipped onto the post by the Iron keeper.
Paddy Madden was then played in with a ball over the top and hit the back of the net but it the Iron were certainly looking like more of an attacking threat in this half.
Despite that, Crewe were still creating chances too and the lively Ikpeazu forced Slocombe into a smart save as the game was heading towards its final stretch.
Jamie Ness was the next to test the Iron keeper and had to leap to his right to keep the ball away from goal.
The Iron’s greater attacking threat in the second half eventually lead to them regaining the lead for the second time of the game in the 77th minute through Llera.
O’Neil managed to play the ball into the box and Llera was there at the far post to slide the ball home to put United back in control.
Substitute Hakeeb Adelakun had a menacing run down the left wing and his cross had to be parried away from goal by keeper Garratt and away from goal.
The Iron were looking to seal the victory and with a minute left, Adelakun was action involved in the action, running at the Crewe defence before his shot was deflected wide for a corner, which came to nothing.
Three minutes of added time were signalled but there were no further clear cut chances and the Iron held on for an important three points, as they now look towards the FA Cup Second Round Replay against Worcester City on Wednesday night.
lron: Slocombe, Brindley, Llera, Davey, Williams, Bishop, O’Neil, Madden, Williams, Hawkridge (Adelakun, 72), Taylor (Osbourne, 46).
Substitutes not used: Olejnik, Boyce, McAllister, Wootton.
Crewe: Garratt, Davis (Inman, 83), Ray, Dugdale, Turton (Cooper, 87), Baillie, Leigh, Ness, Ikpeazu, Ajose, Grant.
Substitutes not used: Shearer, Atkinson, Cooper, Jones, Haber, Tate.
Attendance: 3,006 (231 away).