the wonderful thing about the da vinci code is that the fine line between reality adn fiction is lost in the book... it seems that everything you're reading is true even if it is considered fiction...
the book is mainly based on true facts like there is such thing as opus dei, the free masons, among other things
but the plot itself is based on fiction that is conveniently supported by fact.. (it doesn't help that some facts we know today esp the biblical ones are a bit vague...)
for example, the main controversy in the book is that mary magdalene is the wife of jesus, etc, etc... at first, hearing about this notion, one'd think, it's crazy but then, according to what i watched in discovery channel, in a town named after mary magdalene (forgot which country is it in), there's a legend about her coming to their town via sea hence the name of their town... **
in a way, convenient but very vague findings like those, coupled with some jumped conclusions... when those so called conclusions are strung together, it forms a fiction that seems so real but in actually, isn't all true...
i hope this helps...
** i'm not sure about this since i watched the documentary that mentioned that a long long long time ago... about 2 years i think...