there are 3 types of loyalty in romances. loyalty to God, Lord or king and the lady. Gawain shows loyalty to 3 of them at the same time. the first one is while he's trying to preserve the reputation of Camelot, that's why he takes up a quest like that even though he knows he is limited in strength than the others, the second one is to the Bertilak/Green knight, he is loyal to Green knight because he comes to search for him even though he knows that he will taste the death. he shows loyalty to Bertilak- noble, generous host- because he is still immature, an unexperienced knight after all that's also one of the reasons that he takes up the quest because he has to prove his courage, and he is ready to do anything that his "lord" in green chapel wants. Bertilak also wants to test him and makes up a game to exchange all the things that they gain. Here we again can see the loyalty element as sir gawain returns all he gets to Bertilak honestly. Lastly To the lady Bertilak, Secrecy in romance is so important to protect the honour of the lady so that's why he does not revel anything that lady does to defend him and also as he should be under the service of lady, he both becomes loyal to her and fulfills his duty to his lady.
Sir Gawain shows honorable behavior by refusing the advances made upon him by Lady Bertilak. Also, he kept his word and gave Bertilak all of the kisses that he did receive from Lady Bertilak as agreed upon before the hunting. (Whatever Bertilak kills he will bring to Gawain, but Gawain had to give Bertilak the things such as the kisses. ) This proved to Bertilak who is the Green Knight that Gawain is honest to a degree.
At the end of the story, Gawain survives because of the sash and because of his honesty with the kisses that was given to him. However, he does receives a cut on the neck because he didn't open admit he had it. Gawain tries to return the sash, however he is to keep it as a shameful reminder that he didn't completely tell the truth.