Stuyven's solo gallantry came atop the penultimate climb of the day and three kilometres out from the finish.
The Belgian buried himself to hold off a chasing group of 30 riders only 10 seconds behind that included the likes of tough puncheurs Philippe Gilbert (QuickStep Floors), Peter Sagan (Bora-Hansgrohe) and 2017 Giro d'Italia champion Dumoulin.
Gilbert and Dumoulin almost caught Stuyven on the uphill finish in Geraardsbergen but he was able to hold on over the line, also bagging for himself third place overall.
"I didn't plan the attack," Stuyven said. "I went with the moment. I was near the front on the last climb and saw some gaps were opening, so I decided to just go for it."
"I actually didn't feel that good today but I knew that everyone was probably feeling the same after such a hard week of racing, so I just decided to try.
"I didn't know how much time I had, I just told myself to go all-in and not think of anything else. The final 200 metres were really hard, I was completely empty after the finish."
A nine-rider break formed early on but were only given a lead of around two minutes as Sunweb controlled proceedings, their eyes firmly fixed on the finale as Dumoulin enjoyed just a four second lead over Tim Wellens (Lotto Soudal) after stage six.
The break started to fall apart once the race started hit the local circuits, which included the Muur van Garaardsbergen and the Bosberg climbs playing into Sunweb's plans
"It's great to finally win here after a few years of being close," Dumoulin said. "This was our goal and we all had to come together to make it happen.
"The team was super strong every day and today it was up to us but we had it all under control and I had good legs today."