The race came back together inside the final ten kilometres, meanwhile, and looked set for a sprint finish, until Gilbert’s attack briefly looked to have derailed the fast men’s hopes.
His long-range attempt came up short, however, as Ewan surged past and held off Boasson Hagen behind him to claim the stage win.
Alongside being his second stage win of this year’s race, it is his third win in four at the Tour of Britain, having also won the final stage of last year’s race.
OVO Energy Tour of Britain 2017: stage three – result
1) Caleb Ewan (AUS) – Orica-Scott – 4.04.05hrs
2) Edvald Boasson Hagen (NOR) – Dimension Data – ST
3) Alexander Kristoff (NOR) – Katusha-Alpecin
4) Brenton Jones (AUS) – JLT-Condor
5) Mads Wurtz Schmidt (DEN) – Katusha-Alpecin
6) Andrea Pasqualon (ITA) – Wanty-Groupe Gobert
7) Elia Viviani (ITA) – Team Sky
8) Philippe Gilbert (BEL) – QuickStep Floors
9) Daniele Bennati (ITA) – Movistar
10) Nikolas Maes (BEL) – Lotto-Soudal
General classification
1) Caleb Ewan (AUS) – Orica-Scott – 13.54.34hrs
2) Elia Viviani (ITA) – Team Sky +6”
3) Edvald Boasson Hagen (NOR) – Dimension Data +7”
4) Karol Domagalski (POL) – ONE Pro Cycling +14”
5) Silvan Dillier (SUI) – BMC Racing +15”
6) Kamil Gradek (POL) – ONE Pro Cycling – ST
7) Alexander Kristoff (NOR) – Katusha-Alpecin +16”
8) Fernando Gaviria (COL) – QuickStep Floors – ST
9) Lars Boom (NED) – LottoNL-Jumbo +18”
10) Zdenek Stybar (CZE) – QuickStep Floors +20”