The twelfth-century French poets did not invent the romantic love story. But the conventions of the modern romance novel, romantic comedy film, and Valentine's Day industry owe more than a little to the court poets of medieval France. One of the best of them, Chrétien de Troyes, created two of the most enduring elements of the Arthurian legend: the love affair of Lancelot and Guinevere, and the quest for the holy grail. Setting aside the grail for another time, let's consider what Lancelot can tell us about love in the twelfth century—and in the twenty-first.
From War to Love
Until the twelfth century, King Arthur and his knights were all about warfare, not love. The Welsh tale "Culhwch and Olwen" (probably eleventh century in written form) presents Arthur as the premier hunter of boars and batterer of heads. William of Malmesbury (AD 1125), Caradoc of Llancarfan (1130), and Geoffrey of Monmouth (1136) focus on the battles Arthur won. Geoffrey briefly has Queen Guinevere take up with Arthur's nephew Mordred, and the two of them stage the coup that brings about Arthur's death, but there's no long romance and no Lancelot. Caradoc tells of the abduction of Guinevere—that story is even depicted in stone over a doorway into the cathedral of Modena, Italy (sculpted between 1110 and 1140). But there her rescuer is Arthur, not Lancelot.
The first literary mention of Lancelot is in Chrétien de Troye's earliest romance, Erec and Enide (written between 1160 and 1170), where his name is merely mentioned in a list of knights. The first known account of a love affair between Guinevere and Lancelot is Chrétien's Lancelot; or, The Knight of the Cart (between 1176 and 1181). Chrétien was the court poet of Marie de Champagne, who ask him to write "a romance of courtly love based on the Celtic tales of the abduction and adultery of Queen Guinevere and to make the knight Lancelot her rescuer and lover." 
What "Romance" Meant
What is a "romance of courtly love"? First, a work of romanz was written in the vernacular (French) rather than a serious work, which would be in Latin. Romanz poems were long narratives in eight-syllable couplets. Thus, Chrétien's verse gallops along freely and plays for laughs. Here, in translation, is Lancelot crawling barefoot across a bridge made of one long sword over a roaring river to rescue Guinevere from the evil Meleagant:
With greatest agony in store
he crossed the bridge. His pain was sore;
hands, knees, and feet were cut and bleeding,
but Love, while guiding him and leading,
consoled him, so his pains were sweet. 
Here, Lancelot is the ancestor of every superhero who ever rode—or crawled—to the rescue of a damsel in distress. The vile Meleagant has abducted Guinevere. His father has protected her from violation so far, but she is locked in a castle in the Otherworld. Not Arthur but Lancelot fights through a series of hazards that has inspired generations of writers and filmmakers: hostile knights assail him; a flaming lance plunges into the bed where he spends a night; two lions and a leopard guard the far end of the Sword Bridge; and so on. A "romance," then, is chiefly what we would call a good old action and adventure tale.
And what is "courtly love"? The term used in Chrétien's day was fin'amor, which means pure love, refined love—love from which everything vulgar has been distilled away. Not the love of God, nor even the love of a husband for a wife—fin'amor was a long way from what the church taught. Fin'amor was the fantasy of those who lived with the unromantic realities of upper class marriage.
Love and Marriage in Medieval France
For upper class French women, marriages were arranged to unite dynasties, lands, fortunes. The bride and groom were often strangers. Divorce was so rare as to be essentially off the table. Husbands had absolute power over their wives, and they punished adultery severely. Aristocratic husbands traveled; they might go to the Holy Land for years; their dalliances were overlooked. When such a husband was away, his wife might manage his estates. Thus, some of these wives became powerful women who presided over glittering courts in their husbands' absence. They could do absolutely anything—except have an affair.
The two most dazzling of these courts were Poitiers, ruled by Eleanor of Aquitaine, who was married to the king of France and then to the king of England; and Troyes, ruled by Eleanor's daughter Marie, who at age 19 married the Count of Champagne, a man twice her age who went to war in the Holy Land. Eleanor's father had written love poetry, and Eleanor encouraged her own court poets and musicians to develop fin'amor in story and song. Marie had a conservative religious upbringing away from her mother, but she was also a sophisticated princess, and when she had a court of her own, she likewise gathered noblemen and women to hear the music and literature of love.
The fantasy rules of fin'amor were everything Marie's marriage was not. Emotion reigned. In fin'amor, the man adored the woman and won her love by obeying her every whim. She was the one in charge. Fin'amor inspired a man to great deeds and made both lover and beloved more noble.
In 1185, a few years after Marie commissioned Chrétien to write Lancelot, one of Marie's courtiers named Andreas Capellanus wrote a book called De Amore that describes (and possibly satirizes) the rules of fin'amor. Here are a few of them:
1. Marriage is no real excuse for not loving.
8. No one should be deprived of love without a valid reason.
14. The easy attainment of love makes it of little value; difficulty of attainment makes it prized.
15. Every lover regularly turns pale in the presence of his beloved.
16. When a lover suddenly catches sight of his beloved his heart palpitates.
20. A man in love is always apprehensive.
23. He whom the thought of love vexes eats and sleeps very little.
25. A true lover considers nothing good except what he thinks will please his beloved.
30. A true lover is constantly and without intermission possessed by the thought of his beloved. 
Lancelot exemplifies all of these. He is fearless of foes and wild beasts, but he swoons at the sight of a comb that holds a few hairs from his beloved's head.
If some of these rules seem unappealing to us, we are not the countess in a loveless marriage for whom this literature was created. And anyway, what do the conventions of modern romance books and film say about the beliefs and longings of their audience? Consider three repeated conventions in a sampling of novels and films from my local library:
1. People who have little in common at the beginning of the story, and even dislike each other, end up in a stable committed relationship on the basis of romantic chemistry.
2. Romantic love moves people to turn from vice to virtue. A man who at the beginning of the story enjoys seducing women in a series of brief affairs takes a bet that he can seduce a particular virtuous woman. By the end of the story, her love for him has transformed him into a happily monogamous husband. In another story, a good woman turns a grumbling cynic into a grateful and generous man.
3. True love will do anything to be with the beloved, even become a vampire.
Nobody in the twelfth century thought the rules of fin'amor reflected real long-term relationships. But a surprising number of people today actually believe that although the person they're in love with has significant character flaws, romantic love will change him or her. In The Sacred Search, Gary Thomas laments the stream of married people who enter his office for counseling and say, "Yes, I knew my spouse had this serious character flaw before we were married, but I thought love and marriage would change him." This would be hilarious if it weren't tragic.
Blood on the Sheets
But back to Lancelot. In The Allegory of Love, C. S. Lewis summarizes the traits of courtly love as Humility, Courtesy, Adultery, and the Religion of Love. Lancelot is a paragon of humility and courtesy. Women throw themselves at him, but he refuses them with impeccable manners. He fights in a tournament for the sole purpose of honoring Guinevere, and mops the battlefield with his opponents, but when she sends him a message that he should let himself lose, he obediently behaves like a coward and buffoon while knights and spectators snicker. And when she sends another message that he should win, he promptly reduces the steel-helmeted toughs to a heap of scrap metal. All for her.
Adultery, though. Here was a vexing problem for Chrétien. He had received his education while training to be a minor cleric—not a priest, but still a man of the church. Yet Marie had asked for a tale of adultery. Scholars debate whether real-life courtly love affairs commonly led to consummation, and the consensus seems to be that while in southern France they might have done so, in the north—in Troyes—they probably were limited to flirtation and the occasional kiss. Chrétien's earlier poems drew the line before adultery, but faced with the assignment of crossing that line, he crafts his poem to comment subtly on this aspect of "pure" love.
First, he sets the scene of consummation not in the real world of Arthur's realm but in the Otherworld. The Celtic Otherworld was a parallel world where the normal laws of space and time didn't apply. A knight on horseback could pursue people on foot for days and not catch up with them. The normal rules of behavior were fuzzy there too. Arthurian scholar Verlyn Flieger likens it to a dream world or, more colloquially, to Vegas: "What happens in the Otherworld stays in the Otherworld." By putting the consummation there, Chrétien softens the outrage of adultery.
At the same time, he selects a detail to show the seriousness of the deed. When Lancelot finally climbs the wall of the castle where Guinevere is imprisoned, he rips the iron bars out of her window with his bare hands. He gets a few cuts, which he doesn't notice in the passion of the moment. He leaves her bed in the morning and sets the bars back into the window frame, but he leaves bloodstains from those cuts on her pure white sheets.
The stains are discovered, and because Guinevere isn't bleeding, a wounded knight named Sir Kay is accused of being with her. Lancelot saves Kay and Guinevere, and Guinevere goes home to her husband with her secret intact, but the stained sheets live on in the reader's mind. In this comedy adventure tale there is no hint that the tryst might be the undoing of Arthur's kingdom, but later writers will see the potential. By the time Sir Thomas Malory writes Le Morte D'Arthur three centuries later, the illicit love between Lancelot and Guinevere is not the only poison in the banquet of Camelot, but it is the fatal dose. Secrecy, jealousy, and revenge tear the realm apart.
Romantic fantasy is potent. We're still talking about this story eight hundred years later. It's fun, after all, to get away from our sometimes disappointing realities for a few hours to laugh and dream. But in the middle of the laughter he inspired, Chrétien managed to gently ask Marie and her court how pure their refined, courtly love really is. Masterfully, he became both the great artist and the wise critic of his patroness's fin'amor.