Jarlinson Pantano (IAM Cycling) was first to attack from the peloton, before white jersey Louis Vervaeke (Lotto-Soudal) put a solo dig in.
Vervaeke caught Weening to enjoy a little bit of respite on his wheel, while further back Sky still had numbers on the front having trimmed the peloton down with their earlier pace-setting.
Vervaeke pressed on alone with eight kilometres left to race but Team Sky continued unabated as the young Belgian repeatedly checked back over his shoulder.
His solo effort ended just underneath the 4km banner, with Sky still happy to set the pace on the front as their rivals tucked in behind.
Wout Poels (Team Sky) attacked with two kilometres to go, but Contador was wise to it before Nairo Quintana went, tracked by Ilnur Zakarin (Katusha).
Next to kick on was Richie Porte (BMC Racing) but Chris Froome was on his former team-mate’s wheel into the final kilometre.
Quintana kicked again on the steepest section and earned a gap but Martin accelerated with perfect timing to go a few lengths clear.
With Sky now nowhere to be seen, it was Contador closest to Martin, but the Birmingham-born Irishman could not be stopped and will wear the leader’s jersey on the Queen Stage.
Froome was not the only Brit in the top ten, meanwhile, with Hugh Carthy (Caja Rural) bagging ninth place, six seconds behind the Team Sky man.
Volta a Catalunya 2016: stage three – result
1) Daniel Martin (IRL) – Etixx-QuickStep – 5.00.27hrs
2) Alberto Contador (ESP) – Tinkoff +2”
3) Romain Bardet (FRA) – Ag2r-La Mondiale – ST
4) Tejay van Garderen (USA) – BMC Racing
5) Richie Porte (AUS) – BMC Racing +9”
6) Davide Formolo (ITA) – Cannondale +11”
7) Ilnur Zakarin (RUS) – Katusha +12”
8) Chris Froome (GBR) – Team Sky – ST
9) Hugh Carthy (GBR) – Caja Rural +18”
10) Rigoberto Uran (COL) – Cannondale – ST