Nobody will ever know when and where dance originated, but from the earliest records of civilizations we know that dance was widespread, and that it always had social significance. As dance historians have observed, in ancient Egypt, priests danced to tell stories about the gods. In ancient Greece, the familiar chorus of Greek tragedy had its origins in choral dances performed in a religious context ("choreography" is derived from the Greek χορός, or choros, meaning a chorus of dancers). Classical dance in India can be traced back 2,000 years, and the Kandyan dances of Sri Lanka--which illustrate stories from the Ramayana, a Sanskrit epic--may even be older.
It's clear that what these ancient forms of dance have in common is sharing a story with the community, whether we take that story to be religious, mythological, historical or just an entertaining tale of gods and heroes. Dance also accompanied social occasions like weddings and funerals, as well as healing ceremonies, in which shamans or "witch doctors" used music and dance in ceremonies designed to effect cures. All these ancient dance forms had a social significance.
From early times, dance was also a participatory social activity. Folk dance in which all members of the community--male and female, young and old--participate is a global phenomenon. Folk dancing remains a familiar sight today. American square dancing and barn dancing are still popular. In Britain, colorfully dressed troops Morris dancers perform, today using long sticks which they clash together rather than, as formerly, swords. The stately Catalonian sardana is still performed by circles of participants in public squares and parks. In Italy, the tarantella, a fast-moving dance accompanied by tambourines, is performed even by younger dancers and musicians.
It was a small historical step from folk dances with group participation to those dances in which male and female partners pair off, if only briefly. Some classic dances, such as the quadrille, are designed specifically for the participation of couples. In English country dancing, through carefully choreographed maneuvers, male and female dance partners come together, are separated or exchanged, then come together again. The dance clearly imitates rituals of courtship. The traditional American square dance also separates couples only to bring them together again as they follow the cues of the dance "caller." The custom of dancing with a partner created other social rituals, from dance cards to the "excuse me" convention, wherein a male dancer can politely intervene and take possession of another male dancer's female partner.
The rest of the story we know--or at least our parents and grandparents did. For most of the 20th century, dancing was something couples did, either socially or as a competitive sport. It was a romantic focus of Hollywood movies, and also just a regular part of going on a date. Although partner dancing gave way in the 1960s and 70s to solo forms of expression on the disco floor--a trend with its own social significance--interest in folk dancing and ballroom dancing is with us still. Watching a TV show like "Dancing with the Stars" is just the latest way of participating in an ancient social ritual.