Gilbert (Quick-Step Floors) sealed the victory after Australian Luke Durbridge (Orica-Scott) won the fourth-stage time trial.
The Belgian champion finished 38 seconds clear of Matthias Brandle (Trek-Segafredo) and Alexander Kristoff (Katusha-Alpecin) in the overall standings.
Gilbert led the final warm-up event ahead of Sunday's prestigious Tour of Flanders since taking the opening stage.
“Last year, Quick-Step Floors and Patrick Lefevere put their trust in me and I’m glad to bring home this victory and repay them for the confidence showed.
"Also, I must thank my teammates, because they kept me safe and rode their hearts out to make sure I’ll win this race.
“I think it was the right choice to prepare Ronde van Vlaanderen (Tour of Flanders) here and I’m really satisfied with how I felt and with the outcome.
"I’m motivated for Sunday and I look forward to this beautiful race. Hopefully, it will turn out to be another good one for our team.”
The final day of racing featured a split format with a morning 118.5 road stage followed by an afternoon 14.2km time trial.
The morning was won by Marcel Kittel (Quick-Step Floors) while the closing 14.2 kilometre race against the clock was dominated by Durbridge.
Kittel bounced back from a crash 15km from the finish to hold off Kristoff and Sacha Modolo (UAE Team Emirates) in a sprint.
“The moment I crashed, I said to myself ‘It’s not the perfect situation, but it’s not impossible to make it back to the bunch’, Kittel said.
"Even before going on the circuit we did a great job as a team, and after crashing, Jack, Tim, Davide and Fabio waited and helped me return to the peloton with five kilometers to go, where Max and Saba played an important role in bringing me in the best possible position. It was difficult to make the catch, but I did it thanks to this impressive team."
For Durbridge, the time trial stage was his first victory of the season, one where he has displayed a new maturity as a rider.
The 25-year-old completed the 14.2kilometre time trial course in a time of 17 minutes and 38 seconds to benchmark his fitness ahead of the Tour of Flanders.
"I am really elated to get the win, I have been really consistent lately but a win is totally different," Durbridge said. "It has been a while since I have had a win so I am really happy with today."
"Obviously I was disappointed with yesterday (Stage 2), making mistakes and missing the split and that made me more fired up for today.
"I have done this time trial maybe five times now so I know it well and I went out as hard as I could. It was great to finish off with a win after all the teamwork from the guys, they helped me out a lot each day."