There is no mention of Jesus having a relation with Mary Magdalene in the Bible. However, the New Testament apocrypha Gospel of Philip depicts Mary as Jesus’ Koinōnos, a Greek term indicating a close friend or companion.
Mary Magdalene is mentioned as one of three Marys who always walked with the Lord and as his companion (Philip 59:6-11). The work also says that the Lord loved her more than all the disciples, and used to kiss her often (Philip 63:34-36).
On top of that, Mary Magdalene appears with more frequency than other women in the canonical Gospels and is shown as being a close follower of Jesus. Mary’s presence at the Crucifixion and Jesus’ tomb, has been theorised as at least consistent with the role of grieving wife and widow.
However, it has also been theorised that certain passages indicate that Mary of Bethany was behaving as a Jewish wife, for example in waiting to be summoned when Jesus arrived at Lazarus’ tomb. This issue would be resolved if Mary Magdalene and Mary of Bethany were one and the same character.
In general, proponents of a companionship with Jesus argue that it would have been unthinkable for an adult, unmarried Jew to travel about teaching as a rabbi. However, in Jesus’ time the Jewish religion was very diverse and the role of the rabbi was not yet well defined. It was not until after the Roman destruction of the Second Temple in AD 70 that Rabbinic Judaism became dominant and the role of the rabbi made uniform in Jewish communities.
In conclusion, it remains very hard, if not impossible to prove that Jesus had a relationship with Mary Magdalene, even if she was the same person as Mary of Bethany. The most likely conclusion remains that Jesus did not have a more than friendly or spiritual relationship with anyone.