The Tigers hitman fired his 21st goal of the season in off the post in the 91st minute to snatch all the points.
Earlier, the sides had exchanged second-half penalties with Chris Porter giving the Alex the lead and Josh Magennis quickly cancelling it out.
Hull boss Grant McCann said: “It was a good game with two footballing sides. The character of the boys was excellent again – in the last three away games we have conceded first and got results.
“I was really impressed with the way Mallik took the goal on his right foot, I was pleased to see that nestle in the far post.”
The deadlock was broken when Alfie Jones handled and Porter thumped in from the spot.
But it was 1-1 five minutes later after Callum Elder was tripped by Callum Ainley and sub Magennis smashed home from 12 yards.
Wilks’s winner saw Hull make it seven without defeat.
Crewe: Jaaskelainen; Daniels, Beckles, Lancashire, Pickering; Lowery (Evans 91), Wintle, Ainley (Murphy 74); Dale (Walker 91), Porter (Mandron 83), Kirk. Unused substitutes: Richards, Offord, Wood.
Hull: Ingram; Coyle, Jones, Greaves, Elder; Slater, Docherty, Honeyman (Crowley 76); Wilks, Lewis-Potter (Whyte 87), Eaves (Magennis 62). Unused substitutes: Long, Emmanuel, McLoughlin, Jones.
Referee: C Pollard (Bury St Edmunds).
Support The Yorkshire Post and become a subscriber today. Your subscription will help us to continue to bring quality news to the people of Yorkshire. In return, you’ll see fewer ads on site, get free access to our app and receive exclusive members-only offers. Click HERE to subscribe.