The Quick-Step Floors rider edged out the BORA-hansgrohe pair of Sam Bennett and Australian Jay McCarthy at the end of a 152.3km stage in Calella.
Hodeg's victory came after his Quick-Step Floors team took control of the stage with two kilometres left to go and lead-out men Bob Jungels and Michael Mørkøv delivered him to a perfect finish.
"On the descent, I was somewhere in the middle of the bunch, but Michael gave me a lot of confidence by telling me to stay calm and pacing me back to the front, where Bob showed an insane power in the last kilometres," Hodeg said.
"Many teams wanted to be there, but thanks to these fantastic guys we were all the time in control, they made the difference today and I thank them for that.
“It’s a dream come true. Last week I was celebrating my first pro victory, and now I won a World Tour race against many big and more experienced riders. It is really crazy when you think of it. I was strong today and wanted to get the win for this amazing team who had faith in me."
The stage was earlier animated by animated by a six-man breakaway which failed to make a long lasting impact.
With bonus points from the stage win, Hodeg took the overall leader's white jersey ahead of Stage 2 stage from Mataro to Valls.