Although the Knights Templar were distroyed as an order in the 14th Century there was a very similar order, the Knights Hospitaller.
The Knights Templar are more glamorous partly because of their dramatic end but the Hospitallers are interesting in their own right - for the first time in nearly a thousand years the current Grand Master is an Englishman
http://en.wikipedia.org/wiki/Knights_Hospitall er
Dan Brown's book is basically a web of fiction legend and some fairly reasonably suposition. For example there's good reason to suppose that the church did a pretty good job at downplaying the importance of women in the early church and an especially good character assassination of Mary Magdalene.
However the main theme of the "Holy Bloodline" was originally in a book on 1987 "Holy Blood, Holy Grail"
http://en.wikipedia.org/wiki/Holy_blood_holy_g rail
It was pretty roundly shown to be a fraud then