How does Sir Gawain represent society?
Your question concerning Sir Gawain and the Green Knight is a bit vague, but I'll try to interpret it and answer for you.
The poem is not in any way supposed to be realistic. It's a medieval romance, a fantasy. As such, it supposedly takes place around the sixth century, when King Arthur supposedly lived, according to myth.
Medieval writers did, however, actually write the Arthurian legends as if they were set in the Medieval world. Knights did not exist, for instance, in Celtic England.
That said, one would not want to assume that Gawain represents what people were actually like in the time of the writers. No one is as ideal as Arthurian heroes are. At the same time, what we can learn from the character of Gawain is what society valued: honesty, honor, bravery, humilty, responsibility. We can assume that these qualities were valuable in a medieval world, though again we cannot assume people like Gawain actually existed.
Ironically, though, Gawain does commit wrongs in the poem. He fails to share the magic girdle or belt he receives from the Green Knight's wife, and he flinches as the Green Kinght's blade descends toward his head (considered dishonorable in the poem). And these mistakes actually do make Gawain more human-like, although he's still a long way from being realistic. It is these flaws in Gawain's character that serve as an important step in literature toward eventually, and I do mean eventually, presenting realistic characters that actually do represent actual people.
In the poem "Sir Gawain and the Green Knight," Sir Gawain is a character who is a knight that is loyal to Arthur. He is his relative and a noble man. He stands up against the Green Knight's challenge because he feels that it is beneath Arthur and he wants to honor Authur. He is a brave man whose life is dictated by chivalry.
Sir Gawain represents the good characteristics of society. He is loyal, determined, brave, and responsible. He tries to keep his word. When he tells he knight that he will allow him to take his blows at him after a year, he demonstrates that he honors his word. However, he also fears for his life so he lies about having been given a girdle that supposedly will protect his life.