I want to talk more specifically on somewhat more obscure Arthurian tale that is very interesting in terms of Jaime/Brienne, that of Sir Gawain and Dame Ragnall. It’s also a bit of a Beauty and the Beast tale (mirroring Jaime/Brienne, because the man is the beauty, and the woman is the beast, physically, in this one!) but where Beauty breaks the Beast’s enchantment by falling in love with him, Gawain breaks Ragnall’s enchantment by holding to his promises and respecting her as an individual, which is where I think the similarities come in to Jaime/Brienne.

You can read the very long version, translated from medieval English, here, but I’m just going to summarize: King Arthur went out hunting one day and became separated from his companions. He was captured by a knight who intended to kill him, but decided to spare Arthur on the condition that he return in precisely a year and give him the answer to the question: what women want most? Arthur wasn’t supposed to tell anyone about his encounter, but Gawain, his knight and dear companion, recognized that something was going on, and got the story out of Arthur. Gawain sensibly suggested that both he and Arthur use the intervening months to talk to women all over the place and ask what they wanted. Unfortunately, neither of them got a definitive answer: they got all kinds of different ones, and Arthur, despairing of his life, with only a month left in his timetable, went back to the woods where he’d been captured.

There he met the ugliest woman he had ever encountered in his life:
Her face was red and covered with snot, her mouth huge, and all her teeth yellow, hanging over her lips.  Her bleary eyes were greater than a ball, and her cheeks were as broad as women’s hips.  She had a hump on her back, her neck was long and thick, and her hair clotted into a heap.  She was made like a barrel, with shoulders a yard wide and hanging breasts that were large enough to be a horse’s load.  No tongue can tell of the foulness and ugliness of that lady.
(This sounds a bit like GRRM’s constant, overexaggerated descriptions of how ugly Brienne is, right?)

This woman introduced herself as Dame Ragnall, a virgin (because, well, yeah!) and she told Arthur that she had the answer to his question, which she would give him on the condition that Sir Gawain marry her. Now Gawain, who is present in Arthurian legend long before Lancelot comes swaggering in from Brittany, was considered the handsomest and noblest of all Arthur’s knights, and Arthur felt terrible about even asking Gawain to marry someone like Ragnall to save his own life (I guess he would have felt better if she’d been beautiful *rolls eyes*). But Gawain, being the noble knight he was, instantly said he’d marry the Devil himself to save the life of his King, so Arthur returned to Ragnall with Gawaine’s consent to the marriage, and Ragnall gives King Arthur the answer to the question of what women want:
The one thing that we desire of men above all else is to have complete sovereignty, so that all is ours.
Arthur takes this answer (which Gawain does not know!) to the knight who captured him, and the knight, revealing himself as Ragnall’s brother, sort of gnashes his teeth and lets Arthur go.
Ragnall arrives to marry Gawain, as he promised, and everyone who sees her starts weeping for poor handsome honorable Gawain because he will be yoked to someone so hideous. After the wedding feast, when they are alone, Ragnall tells Gawain that it’s time to do his husbandly duty, or at least give her a kiss, and Gawain says he’ll do what he swore and that’s more than a kiss. He turns around to see a beautiful woman in the place of the hideous creature he married, and Ragnall tells Gawain something unexpected: she is under an enchantment, which means that she can be beautiful some of the time. She tells Gawaine he can choose for her to be beautiful during the day (so no one will mock him for his wife’s hideousness) or for her to be beautiful at night, when they are in bed together. Gawain tells her this:
I would like to choose what is best, but I have no idea what to say, so I give you the choice; do as you like.  Whatever you wish, I put it in your hand.  My body and goods, heart and every part of me is all your own to buy and sell, I vow before God.
Because Gawain has given her what women desire most - sovereignty, the right to make her OWN choice - the enchantment on Ragnall is lifted, and she is beautiful both night and day.

How does this relate to Jaime and Brienne? Well, first of all, as I mentioned, there are the obvious parallels: Jaime is physically beautiful and the companion of the King (albeit a companion who is distrusted and viewed with great suspicion); Brienne is not quite as loathsome as the maiden in the story, but she’s by no means a beauty. But the most important part of the equation for me is the idea of a woman’s sovereignty. We know how important that is to Brienne (she said she wouldn’t marry someone who couldn’t best her in combat) but as far as we know, Jaime is one of only three men who have ever respected her for her prowess and for her Brienne-ness (the other two are her father, about whom we know very little, but I assume since he let her train at arms/go off to join Renly, he was ok with that; and the master-at-arms at Evenfall whom she remembers quite kindly. Neither of them, of course, is a love interest!)

Renly had Brienne join his Rainbow Guard knowing that she would be willing to die for him just because he was kind to her, but we know that he pitied her and there was a substantial amount of self-interest there. Jaime, in contrast, never pities Brienne. He mocks her mercilessly, he tries to kill her, he sees her similarities to Tyrion - but he doesn’t pity Tyrion for being Tyrion any more than he pities Brienne for being Brienne. He does feel pity and empathy for her situation when she is about to be gang-raped (recognizing that it will hurt her psychologically, “on the inside, where it doesn’t show”) but that isn’t because she is ugly, or a swordswench or whatever, it’s because she is a woman whose undoubted strength and courage can’t help her in this particular situation (and unlike the horrific Randyll Tarly, the merest shadow of the idea that Brienne deserves punishment for transgressing the boundaries of her gender never ever crosses Jaime’s mind, although he tries unsuccessfully to convince himself that he doesn’t care what happens to her).

Jaime has an enormous amount of respect for Brienne almost from the beginning of his POV chapters (even in the very first one he thinks that she has steel in her spine, and admires her courage - and her “almost” gracefulness when she dives in the river.) One of the reasons he needles her so mercilessly is because he does respect her, and he subconsciously wants her respect, and he doesn’t want to want it, so he keeps trying to make her do something that will let him say “she’s no different from anyone else” and then he can stop wanting her good opinion of him. But Brienne won’t deliver: he makes her angry, yes, and they fight, but she won’t kill him and subsequently, she takes such tender care of a man she despises that Jaime's perception of her is that she is "warm" and "gentler than Cersei." (I honestly cannot imagine Cersei cleaning up Jaime after he vomits and shits, can you?)

We see Jaime again and again respecting Brienne’s “sovereignty”: He doesn’t intervene in the bear pit until he’s established that she has a tourney sword, because he trusts her abilities enough to know she could kill the bear with a real sword; he gets between her and Loras to stop Loras from killing her on the spot, and vouches for her honor, but he doesn’t intervene in the ACTUAL conversation between Loras and Brienne because he trusts that Brienne will convince Loras about Renly’s death on her own; he gives her a quest and the tools to achieve it in the belief that she is perfectly capable of doing so. In short, he doesn’t treat her any differently because she is a woman (cf. contrast to Randyll Tarly or the knights of Renly’s court.)

Now the similarities to this story of Sir Gawain and Ragnall only go so far: obviously Brienne isn’t going to turn into a raving beauty whose bed Jaime can’t bring himself to leave :D But I think we also see a transformation of Jaime’s perceptions of Brienne through his descriptions of her eyes:
"Pretty eyes, and calm" to "her big blue eyes were full of hurt" to "she does have astonishing eyes."  Have Brienne’s eyes changed that much to go from “pretty” to “astonishing”? Hardly. Brienne’s one physically attractive attribute are her lovely eyes, and it’s not surprising that this IS her one beauty because of course, there is that whole cliche about the eyes being windows to the soul. As Jaime comes to know Brienne better and better, to know her character, her eyes become not just big and blue and pretty but astonishing because *she* is astonishing and beautiful to him. When he gives Brienne Oathkeeper, the sword that he names both for her and for what he aspires to be, Jaime, like Gawain, is saying to his own beautiful and loathly maiden Brienne: “Whatever you wish, I put it in your hand. My body and goods, heart and every part of me is all your own.”

By the way, the loathly maiden of Gawain’s story marries him, and bears him a son, and they are blissfully happy (for five years, and then she dies which is sadly totally an ending I can see Martin pulling!)