The film is not RPG related. It is simply based on the medieval poem Sir Gawain and the Green Knight by an unknown author. It is one of the most famous Aurthurian stories and has been translated many times into Modern English. I read the Tolkien translation earlier this year after watching the trailer and quite enjoyed it; Tolkien manages to preserve a lot of the alliteration the initial author had used and so I always recommend this translation. There seems to be a free pdf version here.