It was the first time Loach, known for producing gritty social dramas, had won the Palme d'Or.
The 70-year-old director had been nominated seven times previously during a 40 year career.
"We live in extraordinary times and that has made people political in a way they maybe weren't in the previous four, five, six years," said Loach on accepting the award.
"The wars that we have seen, the occupations that we see throughout the world - people finally cannot turn away from that. It's very exciting to be able to deal with this in films, and not just be a complement to the popcorn."
Chinese director Wong Kar Wai, president of the nine-member Cannes jury, said the decision was unanimous.
Second prize at the festival went to Bruno Dumont for Flanders, a French production farmer called up to fight in a war in an unspecified country reminiscent of conflicts in Iraq and Afghanistan.
In Loach's film, Cillian Murphy and Padraic Delaney star as brothers who join the rebellion against British forces in Ireland.
The Wind that Shakes the Barley portrays the violence meted out by Britain's Black and Tans, the local name for an irregular force of mostly former soldiers brought in by the British government after 1918 to assist the Royal Irish Constabulary in fighting the rebellion.
But the film also shows what happens when an unpopular peace treaty which pledges allegiance to the British crown tears the brothers apart.
Its triumph was a surprise decision by the jury. Critics had tipped Volver by Spanish director Pedro Almodovar to win the top honour.