The Belgian champion innocuously moved away from a leading group on the second ascent of the Oude Kwaremont climb and immediately gained a decent gap to an elite group of riders behind.
With no urgent impetuous to chase from anyone, Gilbert was allowed to ride out solo as his teammates marked rivals behind and the gap hit a maximum of 1-10.
Defending champion Peter Sagan (Bora-Hangrohe) formed the key chasing group after attacking on the Taaienberg with just under 30km to go, taking pre-race favourite Greg Van Avermaet (BMC) and Oliver Naesen (Ag2r La Mondiale) as well as a number of other riders along with him.
That group began to work fairly well together, gradually reducing Gilbert's lead by the odd second. Drama struck though as Sagan, Naesen and Van Avermaet all hit the deck on the penultimate climb of the Oude Kwaremont after it seemed Sagan collided with the barrier.
Van Avermaet was able to get back on his bike and chase on, while Naesen and in particular Sagan were delayed by the crash and were never able to get back to the main chase group.
That all helped Gilbert's cause as he held the gap at around 50 seconds over the final climb of the Paterberg.
That did come down dramatically on headwind section towards the finish in Oudenaarde, with Van Avermaet and Dylan Van Baarle (Cannondale-Drapac) putting in big turns behind, cutting the gap to 30 seconds with 4km to go as Niki Terpstra (Quick-Step) sat on their wheel with his teammate solo out front.
But it was all too late for the group behind that had formed after the Paterberg, and Gilbert was able to celebrate by lifting his bike over his head across the line after his sensational victory.
How it happened
The day had got off to fairly calm start with the day's main break being allowed to get away from the peloton with relative ease. Eight riders were able to get away, and established a maximum gap of 11 minutes before the racing really kicked into gear behind.
And that action really began on the approach to the Muur van Geraardsbergen, where Quick-Step took control on the front of the peloton.
Tom Boonen (Quick-Step) and Gilbert then seemed to put a plan into action as they attacked up the steep cobbled climb. That separated the main peloton straight away, and a 14-man group got away from the bunch with 96km to go.
That elite group left the likes of Sagan and Van Avermaet behind, with Maciej Bodnar (Bora-Hansgrohe), Boonen, Gilbert, Matteo Trentin (Quick-Step), Sep Vanmarcke (Cannondale), Jasper Stuyven (Trek-Segafredo), Alexander Kristoff (Katusha), Luke Rowe (Sky), Gianni Moscon (Sky), Arnaud Démare (FDJ), Sacha Modolo (UAE Team Emirates), Pieter Vanspeybrouck (Sport Vlaanderen), Bryan Coquard and Sylvain Chavanel (Direct Energie) all getting away.
That group took a minute out of the peloton with BMC and Orica-Scott doing the bulk of the work to try and bring it back.
The first bout of drama then took place within the front group though, as Sep Vanmarcke inexplicably crashed on the descent from the Kwaremont and brought down Rowe, with both riders slipping out of contention.
Gilbert had already made his move over the Kwaremont by this point and had 20 seconds or so in hand before increasing that to 30 seconds over the Paterberg.
The two groups behind came together ahead of the first climb of Paterberg, with Fabio Felline (Trek-Segafred) and Dylan Van Baarle (Cannondale) going on the attack to try and chase Gilbert.
There was then bad luck for Boonen ahead of his favourite climb of the Taaienberg with 40km to go, suffering a mechanical at the bottom before suffering another one immediately on his replacement bike.
With Boonen now out of contention in his final ride in De Ronde, a seven-man group formed on the Taaienberg after Sagan attacked, with Trentin, Van Avermaet, Van Baarle, Felline, Naesen, and Yoann Offredo (Wanty-Groupe Gobert) taking up the chase for Gilbert.
That all fell apart on the final ascent of the Oude Kwaremont though with around 16km remaining, as Sagan, Van Avermaet and Naesen got away before they all came down in a crash.
That crash allowed Niki Terpstra and Van Baarle to catch up to Van Avermaet as Gilbert continued with over 50 seconds out front.
There was nothing they could do to bring him back though, and the three-time Monument winner was able to add another to his palmarès.
Van Avermaet was able to beat Terpstra to second place behind in a sprint finish, with Van Baarle taking fourth place.
Tour of Flanders 2017 (260km)
1. Philippe Gilbert (Bel) Quick-Step Floors, in 6-23-45
2. Greg Van Avermaet (Bel) BMC Racing, at 28s
3. Niki Terpstra (Ned) Quick-Step Floors)
4. Dylan Van Baarle (Ned) Cannondale-Drapac, all same time
5. Alexander Kristoff (Nor) Katusha-Alpecin, at 52s
6. Sacha Modolo (Ita) UAE Team Emirates
7. John Degenkolb (Ger) Trek-Segafredo
8. Filippo Pozzato (Ita) Wilier Triestina
9. Sylvain Chavanel (Fra) Direct Energie
10. Sonny Colbrelli (Ita) Bahrain Merida, all same time
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1