Mormons believe that Jesus was married & were enthusiastic about The Da Vinci Code as a sort of popular confirmation of this belief; they also believe that everyone apostasized from Christ after the apostles’ generation.
One pretty much has to believe that Jesus was so important that the Church spread the news about Him throughout the ancient world and that while spreading the news of His life, death & resurrection, the Church was conspiratorily hiding the fact of His marriage & real mission.
I don't think any early heresy taught that Jesus was married. This is something that came in with anti-Catholic agitation on the question of a celibate priesthood.