There are many dozens of events in the gospels that are very similar, or identical, to incidents which appeared centuries before, in the stories of Pagan hero/saviors. These godmen were worshiped by the priesthood and laity of Mediterranean and Middle East religions. This linkage was known by many early Christian writers. They attributed the parallels to Satan. They figured that the devil had influenced the creation of Pagan religions in the centuries before Jesus' birth. The devil had caused those religions to worship saviors whose lives were nearly identical to Jesus'. Satan's purpose was to make a pre-emptive strike against the gospel stories centuries before Jesus was born. The devil would thereby discredit them, using the technique of diabolical mimicry. Other Christian theologians have taught that Pagan myths were simply pre-echoes of Jesus' life -- a form of prophecy or premonition. There are other possible reasons for the linkages.
Modern-day conservative Christians either discount the similarities of gospel and pagan stories, or agree with the assessments of early Christians. Some of the most radical of liberal Christians see Jesus as simply the Jewish equivalent of a Pagan savior, such as the Egyptian Osiris or Greek Dionysus. They view Jesus' biography in the gospels as having been largely lifted from Paganism.