Sir Gawain and the Green Knight is an important Arthurian tale, in which Morgan Le Fay tests the noble Sir Gawain, to see if he will hold on to the chivalric code (bravery, self-control, honesty) under any circumstance. He passes the test, but not completely.
[for a summary of the events in the story, see this article]
Sir Gawain and the Green Knight
On the surface, it appears that Sir Gawain's biggest enemy is the Green Knight. On New Year's Eve, this knight visits Arthur's court and proposes a game: whoever will cut off his head will receive his axe and expect a return stroke the next year. Sir Gawain agrees and does the deed. He has to go to the Green Chapel and receive the blow.
This looks like the biggest conflict in the story. It appears that the hero is going to lose his head, after all. During the whole tale, the dread of his meeting with this mysterious undead knight is slowly building up until the day before the encounter, when the "possibility" of surviving the next day is placed before him and he eagerly takes it.
Sir Gawain and Lady Bertilak
The conflict between Sir Gawain and Lady Bertilak is less obvious, but is also essential to the story. When Sir Gawain is resting in the castle, Lady Bertilak comes to his room and tempts him, but he resists. Lady Bertilak comes into his room when he wakes up and asks him to kiss her. The temptation for him was to take it further than that, but he did not. The kiss he gave her was out of politeness.
This conflict is important because it is one of the ways that Morgan Le Fay tested Sir Gawain. Lady Bertilak insists that Gawain must not know the rules of chivalry, or he would kiss her. In this, Lady Bertilak manipulates Sir Gawain into breaking the code. However, the knight resists Lady Bertilak's temptations, but his desire to survive leads him to accept the magical belt she gives him.
By resisting Lady Bertilak's advances, the knight did not "lose his head" in temptation but kept his self-control and came out on top.
Sir Gawain and Morgan Le Fay
Sir Gawain's conflict with Morgan Le Fay is not as direct as with the other two characters because the knight never actually meets her or knows she is testing him and overseeing his progress. Instead, Morgan's curiosity is the cause of Sir Gawain's testing, as she wants to see what makes a real man.
Morgan chose Sir Gawain as the test subject because he was the best knight in Arthur's court. She gives him these tests, and concludes at the end that what makes a man is imperfection because even though Sir Gawain passed all the tests but one, when he failed because he accepted the belt and did not tell Lord Bertilak about it in the game they played while at his castle.
In conclusion, in Sir Gawain and the Green Knight, the hero has to overcome the challenges of Morgan's test and almost manages to pass it, failing because of his fear of the Green Knight. Even though he is imperfect, Sir Gawain is still depicted as the exemplary knight.