The route featured 29 cobbled stretches covering a total of 54.4km.
The first half of the race saw numerous riders crash and suffer punctures.
The first of these being Jasper Philipsen (UAE Team Emirates) and Julien Vermote (Dimension Data) who were in the peloton. They were fall unhurt and were able to continue.
With 144km remaining,Alexander Kristoff (UAE Team Emirates) and Andre Greipel (Arkéa-Samsic) suffered punctures in the main peloton.
This was followed by a puncture for Matteo Trentin (Mitchelton-Scott) and Michaël Van Staeyen (Roompot-Charles) in the break.
At 131km to the finish Taco van der Hoorn (Jumbo-Visma) crashed badly in the left-hand gutter as the bunch travelled through sector 24.
He was face down in the verge and was forced to abandon the race.
With 65km to go, Gilbert attacked the leading group of favourites, whittled down over the cobbled sectors, with Politt and Rudiger Selig (Bora-Hansgrohe) following.
A number of riders then tried to get across, but the next big move was led by Peter Sagan, with the group reeling in Gilbert and Sagan animating the group, making it clear his intent for the move to stick.
This select group opened up a gap of more than a minute with 40km to go, featuring Wout Van Aert (Jumbo-Visma), who suffered a heavy fall earlier in the race, Sep Vanmarcke (EF Education First), Yves Lampaert (Deceuninck – Quick-Step), as well as Politt, Gilbert and Sagan.
Philippe Gilbert attacked again with 23km to go, taking Sagan and Politt with him, and as Lampaert dragged Vanmarcke back up to the leading group Van Aert was distanced, paying for his misfortune earlier in the day.
Despite Gilbert’s attacks typifying yet another attritional cobbled Classic, it was Nils Politt who opened up a huge gap with 14km to go, with only Gilbert able to go with him.
The two opened up a 40-second gap as they headed towards the finish, with Sagan dropped from the chasing group with 6km to go as Lampaert hunted down the two leaders.
Gilbert and Politt entered the Roubaix velodrome, as a game of cat and mouse ensued, with both also looking around and waiting for the arrival of Lampaert. Politt lead the leading duo, with Gilbert opening up his sprint first and going round the German in the last hundred metres to take the victory.
The first ten riders
1. Philippe Gilbert (Bel) Deceuninck-Quick Step 5:58:02
2. Nils Politt (Ger) Team Katusha-Alpecin
3. Yves Lampaert (Bel) Deceuninck-Quick Step +0:00:13
4. Peter Sagan (Svk) Bora-Hansgrohe +0:00:42
5. Florian Senechal (Fra) Deceuninck-Quick Step +0:00:47
6. Mike Teunissen (Ned) Team Jumbo-Visma
7. Zdenek Stybar (Cze) Deceuninck-Quick Step
8. Edvaldas Siskevicius (Lit) Delko Marseille Provence
9. Sep Vanmarcke (Bel) EF Education First
10. Stefan Kung (Swi) Groupama-FDJ