Shields were used in the past for two major reasons. First, the shield was used to protect the knight or foot soldier from harm, both from swords and arrows, among other kinds of weapons and forms of attack.
For knights (and they were generally of noble birth, or had been awarded knighthoods by the king for service in battle), the shield also had symbols on it to help alleviate confusion during battle as to which side a knight supported. In allowing your comrades from other castles of the realm to know you were a friend, it also identified you to your enemy.
However, the symbols on the shields were carefully and specifically chosen, as the pictures shown had symbolic meanings. Often the symbols would reflect the motto that a noble family had carried for generations to inspire themselves, and declare their sense of family and/or loyalty, for example. The symbols used in the medieval period were widely recognized, as are symbols used today, such as the cross or the Star of David.
In "Sir Gawain and the Green Knight," the pentangle was a "symbol of harmony, virtue and idealism" for Christians.
That Gawain is Mary's Knight is made clear as he is robed for battle. She is represented as one of the five points of the pentangle, through the five joys of Mary, and her image is etched on the back of his shield. The poem describes the arming scene which shows her special relationship to him:That [Gawain's] prowess all depended on the five pure Joys that the holy Queen of Heaven had of her child. Accordingly the courteous Knight had that Queen's image etched on the inside of his armored shield, So that when he beheld her, his heart did not fail. [emphasis is my own]
Recognizing the significance of the symbols on Gawain's shield, and pairing those symbols with the sense that the shield was one of a knight's main sources of protection against attack, it is easier to see that the symbols on the shield provide Gawain with defense against not only aggression in battle, but against the evil that might tempt him to turn his back on his honor and who he served: not only Arthur, but particularly the Virgin Mary, who throughout time, regardless the politics of men, has served as the epitome of a pure and chaste woman.
[Remember, too, the idea of chivalry was introduced by the Church to provide knights with a code of honor so they might behave in a more civilized way while on the Crusades, battling the "infidels" in the name of Christianity abroad. Before the idea of chivalry was adopted, many knights were little more than murderers, rapists and pillagers, and the Church did all it could to control those "soldiers of Christ." It did not always work, but it gave many men an ideal to follow.]