What Country Dance actually is remains a matter of debate. It is a term often used synonymously with Barn Dance, Ceilidh and similar terms. Country dancing is social dancing - that is undertaken by ordinary folk for a particular celebration or occasion at a gathering. What actually makes a dance a country dance is the debatable part.
Popular social dancing has probably always been with us. Sometimes the popular dances became fashionable in the higher echelons of society such as court and sometimes dances which began life in court (and often originating from abroad) filtered down to be enjoyed by ordinary people. As happens elsewhere in the traditions, tunes, moves and even whole dances became established in with the older separate dances.
There is a suggestion (Cecil Sharp Country Dance Book 1909) that the Country Dance is a re-engineering of the French Contredanse which itself was a English eightsome square dance. The result is what the English called the Quadrille. Sharp rejects the false etymology of Country Dance from contredanse though since Country Dance references in literature predate references to contredanse. It is more likely that it worked the other way - Contre or opposite being derived from Country as a sort of natural mistake upon hearing it pronounced.
It appears as though 'Country Dancing' became popular in the reign of Elizabeth I as a fusion of the ordinary dances done by the people and the courtly dances invented by the Dancing Masters. The best known (although later) Dancing Master was John Playford who published a collection of 105 dances and tunes in 1651 and which still has influence today. The Country Dances maintained their popularity until the influx of new couple dances from abroad in the 19th century - dances such as the Waltz, Polka and Mazurka.