Here is the thing that really bugs me about the Church's reaction to this whole thing: even if it were all true, the message is the same. Should anyone believe any of [the book]? No. If it were to somehow all be proven as fact should that change any aspect of one's faith? Hell no. Jesus' message was one of compassion. Forgive, love your enemies, do good to those who hurt you, turn the other cheek, help the poor, put love and compassion for all of mankind above any rule laid down by humanity. These are the consistant lessons of the new testament (all things that are the opposite of the actions of the religious right in this country). In the Gospels it is neither stated nor even entoned that sex is a vile thing, that procreation is its only purpose, that gay sex leads to hell, or that women are any less than men in any way...in fact throughout the gospels we see Christ treating women as equals. He speaks with them in public, he has consort with sinful women (typically assumed to be prostitutes), he treats women as human beings--he treats them with respect. (Jesus also never says to forgive those who wrong you seventy times seven times, then kill them, but that's another rant.)
So the book paints the Church in a poor light. But, hey, frankly, the Vatican hasn't really done a whole lot to not deserve it. In practice, in the Catholic Church, women are inferiors. They are not allowed to become priests, which is more than enough to demonstrate the practical inferiority in treatment. Further, birth control and abortion views are far more anti-female than anti-male (fundamentally this is not, necessarily, true, but in perception and practice it is). Historically the anti-sex view of the church was also an anti-female practice. Men were almost expected to have sex, even if not married--heck there was even a pope who (was rumored to have) had sex parties at the Vatican where he would bring in prostitutes and the men would compete to see who could copulate the most (he counted the # of ejaculations), and you thought the church was stuffy. Point is the Catholic Church has never been a particularly friendly place for women, especially those who have been sinners, and who hasn't. Even the strides that were made in the 20th century to make the Church more open to its secular body didn't do anything, specifically, to improve the standing of women. The closest the church has come to leveling the playing field is to emphasize that masturbation is a sin (in perception this affects men more), and I don't know that I've met a Catholic male, willing to discuss it, that doesn't consider this ridiculous (the typically given reason would actually make not having sex at least ~once/week a sin for any male past puberty...and wet dreams used to be considered sinful too).
I think the primary drive to success for the book is its overt statement of the equality of the sexes (the glory of the female) and the lack of shame regarding sex. Now there are a whole bunch of ways things are better when people do not succumb to every sexual desire that they have, and abstinance certainly has benefits, but so long as sex is seen as sinful and shameful, and women are treated as inferiors within the Catholic Church The DaVinci Code will continue to have success and more people will come to look with increasing disdain upon the Vatican. If the Church spent more effort fixing the problems rather than decrying a work of fiction, maybe there would be no reason to fear that people may read (view) it as fact.