It's not just the religion angle. The historical backdrop is utterly fallacious as well. This is supposed to be "historical fiction" and in that genre it is essential that the facts are correct. (Believe me, I was a librarian.) Brown couldn't even get historical facts right. I guess that's what happens when you let your wife do the research!!
Even if the historical backdrop was 100% true, the movie still doesn't make one lick of sense.
You've got some pile of bones, allegedly Mary Magdalene. You've got some woman, allegedly her descendent. If it can ever be proven that the woman is related to the bones, the entire Christian religion will come to a screeching halt.
Bull Hockey. You still need a leap of faith to believe the woman in the tomb is Mary Magdalene. Even if it is Mary Magdalene, you still need a leap of faith to believe that she had children by Jesus and not some other person. Then you need a further leap of faith to believe that this somehow disproves Jesus was divine.
Even so, The Da Vinci Code could have been fun if it didn't take itself so gosh darn seriously. A couple years back there was a movie called National Treasure with pretty much the same Knights of Templar conspiracy theory angle, but it was a much more enjoyable movie because it didn't drone on about how anyone who wasn't part of the conspiracy was a pathetic dupe.
That's not essential for historical fiction, actually. Usually, in fact, the more accurately historical fiction hews to all the historic details, the more boring it is, since that straitjackets the story so much. There are some happy exceptions, of course, but in general "historical fiction" is usually a mix of historic facts/settings/people, and a healthy dose of "poetic license".
He got three facts right at least. London is in England. Paris is in France. And Leonardo da Vinci was a painter.