The role of the knight and his connection to the Virgin Mary is explained as follows:
The medieval development of chivalry, with the concept of the honor of a lady and the ensuing knightly devotion to it, not only derived from the thinking about the Virgin Mary, but also contributed to it. The medieval veneration of the Virgin Mary was contrasted by the fact that ordinary women, especially those outside aristocratic circles, were looked down upon. Although women were at times viewed as the source of evil, it was Mary who as mediator to God was a source of refuge for man.
This provides a basis for the connection between a knight and his code, and his inspiration from the Virgin Mary. In the case of Sir Gawain and the Green Knight and the Arthurian legends, knights are at the heart of both tales, and each of the three women mentioned take on new dimension when compared to Mary.
Lady Bertilak, in Sir Gawain and the Green Knight, may be seen as a temptress trying to lure Gawain away from his oath to the Church and to Arthur.
The code of the knights and chivalry, were to some extent, "invented" by the Roman Catholic Church in order to govern the behavior of its knights, and encourage them to protect the weak and less fortunate.
A true knight took a vow with the Church and his "inspiration" was the Virgin Mary. It was not unusual that a knight would have a picture of his patroness painted on [the inside of] his shield as a source of inspiration.
[Arthur's] shield was called Pridwen, which depicted the Virgin Mary...
Lancelot is constantly tied to the Christianity associated with Arthurian Legend. Raabe compares Lancelot’s quest for Guinevere in “Lancelot, the Knight of the Cart,” as a quest likening to Everyman’s quest for salvation and Christ’s quest for the human soul.
Whereas Lancelot can be seen as the epitome of a man's "quest for salvation," by example seen in his quest for Guinevere, once she becomes involved with Lancelot, he, in turn, breaks faith with the Virgin Mary and his oath to the Church.
With regard to Morgan le Fay, when the Green Knight reveals himself as Bertilak, he admits that he was put up to the entire affair (in some translations/versions of the story) by Morgan le Fay, Arthur's half-sister. However, Morgan, with her very dark side, would have no connection to the Virgin Mary. In fact, she can be seen as Mary's antithesis:
In another well-known work—the anonymous late 14th Century poem 'Sir Gawain and the Green Knight' (the Green Knight was, like Morgan, a 'shape-shifter')—she was the instigator of the plot which began the story. Here, the Virgin Mary (as the female archetype representing spiritual love, obedience, chastity, and life) is contrasted with Morgan Le Fay's representation of courtly love, disobedience, lust and death.
It would seem that Lady Bertilak can be seen as a challenger of the knight's oath to the Virgin Mary and the Church. Morgan le Fay can be seen as the antithesis of the Virgin Mary. And Guinevere may well be the temptress who lures the once-loyal knight away from service to the Virgin Mary.