Anton attacked 400ms from the line on the steep uphill finish in Valdepenas de Jaen for Spain's first stage win in their biggest home race.
Italy's Vincenzo Nibali was a close second behind the Euskaltel rider, with Slovakia's Peter Velits third.
Stage three winner Gilbert finished close behind to remain in the overall lead for a second successive day.
The Tour of Spain ends in Madrid on September 19th.
Stage Results:
1. Igor Anton (Spain / Euskaltel) 5 hrs 00 mins 29 secs
2. Vincenzo Nibali (Italy / Liquigas) +1"
3. Peter Velits (Slovakia / HTC - Columbia)
4. Joaquim Rodriguez (Spain / Katusha)
5. Philippe Gilbert (Belgium / Omega Pharma - Lotto) +5"
6. Tejay Van Garderen (U.S. / HTC - Columbia) +8"
7. Ezequiel Mosquera (Spain / Xacobeo) +12"
8. Nicolas Roche (Ireland / AG2R)
9. Ruben Plaza (Spain / Caisse d'Epargne)
10. Rigoberto Uran (Colombia / Caisse d'Epargne) +19"
Overall Standings:
1. Philippe Gilbert (Belgium/Omega Pharma-Lotto) 13h 56m 30s
2. Igor Anton (Spain / Euskaltel) +10"
3. Joaquim Rodriguez (Spain / Katusha)
4. Vincenzo Nibali (Italy / Liquigas) +12"
5. Peter Velits (Slovakia / HTC - Columbia) +16"
6. Tejay Van Garderen (U.S. / HTC - Columbia) +29"
7. Xavier Tondo (Spain / Cervelo) +49"
8. Fraenk Schleck (Luxembourg / Saxo Bank) +50"
9. Ruben Plaza (Spain / Caisse d'Epargne) +54"
10. Ezequiel Mosquera (Spain / Xacobeo) +55"