The GreenEdge rider timed his move to perfection, just after the Flamme Rouge, and crossed the line comfortably ahead of team-mate Allan Davis and Davide Appollonio of Team Sky.
Stage one winner Jose Joaquin Rojas was fourth and retains his lead on GC.
Thibaut Pinot (FDJ-Big Mat), Mads Christensen (Saxo Bank), Jerome Pineau (Omega Pharma-Quick Step), Gabriele Bosisio (Utelsilnord) and Julian Sanchez (Caja Rural) were involved in the break of the day in wet conditions.
The quintet led by 5:20 with 50km to go as they crossed three third category climbs, sandwiched by a cat-two ascent, but that lead was soon whittled down in the closing stages of the 166km stage that set off from Guenes.
Their lead was down to a minute with 20km to go and they were caught with 13km remaining, shortly after the penultimate climb of the day.
A bunch of counter-attackers on the final climb of the day were nullified by Astana who set the pace on the descent as they looked to set up the stage for their sprinter Francesco Gavazzi.
But the 27-year-old from Johannesburg made the perfect move to record his first win on European soil since claiming the Tour of Turkey in 2009.