Tony Gallopin (Ag2r-La Mondiale) finished second, while Davide Formolo (Bora-Hansgrohe) was third on what turned out to be a fast 185km stage from Vasto.
In the final 5km Bilbao, Gallopin, Formolo, Lucas Hamilton (Mitchelton-Scott) and Mattia Cattaneo (Androni Giocattoli-Sidermec) were up front, with José Joaquín Rojas (Movistar) joining them on the descent to the finish.
The 29-year-old Bilbao, who placed third in this year’s Vuelta a Murcia and Volta a la Comunitat Valenciana, attacked and had a gap as the road kicked up, with Cattaneo going after him.
The former then started his sprint to the line and punched the air in celebration as he crossed it.
“I knew I could attack my rivals,” said Bilbao, who placed sixth overall in last year’s Giro.
“Formolo was the rider to beat but I sensed he was feeling the pressure to win. I waited for my DS to tell me when to go and went. It was a long final kilometre but I had something left and could win.”
Earlier, an attack by Formolo after 80km caused a 12-man breakaway to go. The group had a maximum lead of two minutes and 10 seconds, with Bilbao and Antonio Pedrero (Movistar) at the front.
The break lost Thomas De Gendt (Lotto-Soudal) and Rubén Plaza (Israel Cycling Academy) on the Le Svolte di Popoli climb, which was almost 10km long.
The remaining riders were Bilbao, Formolo, Pedrero, Cattaneo, Gallopin, Sebastián Henao (Ineos), Jay McCarthy (Bora-Hansgrohe) and Andrey Zeits (Astana).
As they started the Via della Polveriera climb McCarthy, Zeits, Rojas and Henao were dropped.
Formolo and Cattaneo went on the attack with 6km remaining and were joined by Hamilton, Gallopin and Bilbao, before the sprint to the finish.
Valerio Conti (UAE Team Emirates) managed to hold on to the pink jersey.
“I went on the attack at one point because the race was going away from us. We expected a hard stage but it was harder than we had imagined.”
“I kept telling myself to hang on and keep the jersey. I’m so happy I did.”
The eighth stage will take riders on a 239km journey from Tortoreto Lido to Pesaro.