The 36-year-old suffered a broken kneecap after he hit a low wall and fell some distance on stage 16 of the Tour.
After finishing the stage, Gilbert discovered he had fractured his knee and withdrew from the race but was given the day's combativity award for his efforts.
Gilbert said: “The first days after the crash were a bit difficult, to be honest.
"Experts were saying that the injury didn’t look good and that it would take a long time to recover, many even said the season was over and that I should start focusing on 2019.
“I didn’t want to hear this however, and wanted to prove them wrong, so I worked really hard to get back, day and night. And I mean it, I literally woke up at night and started doing exercises.”
The Quick-Step Floors rider will take to the start line of the Grand Prix d’Isbergues one-day race in northern France at the end of September.
He added: “I can’t tell you how happy I am that I will be back racing this year.
“I am very ambitious. I want to win races. That is how things are working in my head.
"People may think it’s crazy to set such goals – and maybe it won’t happen this year – but this mentality is what drives me as a rider and what gave me motivation to get back to the Wolfpack as fast as possible, against all odds.”
Gilbert had attacked a 46-man breakaway on the 16th stage of this year’s Tour, and was leading on the descent of the Col de Portet-d’Aspet.
But the former world champion hit a corner with too much speed and locked up his rear wheel.
His momentum carried him into a low wall and he fell down a big drop on the other side.
Gilbert spent two days in hospital before going home to continue his rehabilitation.
After struggling through the pain to ride 20km at first, last week he was able to make his first effort on the bike.
A week-long training block still separates Gilbert from his return, but he hopes he will be able to get race speed back into his legs.
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