Jesus and Mary and the Gnostic Gospels
According to Dan Brown in The Da Vinci Code, the Gnostic Gospel of Philip calls Mary Jesus' wife, and describes him kissing her on the lips. The text, as he quotes it, says this:
The companion of the Saviour is Mary Magdalene. Christ loved her more than all the disciples and used to kiss her often on the mouth. The rest of the disciples were offended by it. They said to him, 'Why do you love her more than all of us?'
Then Dan Brown has Leigh Teabing argue that the word translated 'companion' actually means 'wife.' There are three problems with the way he uses this quotation:
(1) Missing wife
The Gnostic Gospels in the Nag Hammadi library are Coptic translations of Greek originals. The word used for 'companion' in this quotation is borrowed from the Greek - 'koinonos.' But there is a perfectly good Greek word for 'wife,' which is not used here. 'Koinonos' just means 'someone who shares with...' It can refer to friendship, or fellowship. It does not mean 'wife.'
(2) Missing words
The original manuscript is badly preserved at this point, so that the text is broken up. What it actually says is:
And the companion of the [...] Mary Magdalene. [... loved] her more than [all] the disciples [and used to] kiss her [often] on her [...].
Everything else is guesswork: the kiss on the lips is guesswork, at best. Most likely, the kiss referred to here is the kiss of fellowship, and does not have any sexual significance.
(3) Missing meaning
The third problem is that the passage is not meant to be about the historical Jesus and the historical Mary at all. It is a passage full of imagery and metaphor, and it probably has a symbolic meaning. Most likely it is an allegory for the historical church (represented by Peter) and the Gnostic movement (represented by Mary).
So the Gospel of Philip does not really say what Dan Brown claims for it. In fact, even if we accepted the Gnostic Gospels as completely reliable documents, there is nowhere where they explicitly claim that Jesus was married - to Mary Magdalene or to anyone else.

