For centuries Christian church marriage was largely a sacrament for those with title or property. Most of the Christian population did not do more than verbally agree to be wed, often without witnesses in what we today might consider as a common-law marriage. It was only the pressures of the Reformation and Counter-Reformation that had both sides demand that a wedding be a church function to be legitimate, presumably so they would know who their own believers were.
So by the measure of Christianity, sex outside of a church-sanctioned wedding only became immoral about 1500 years after the founding of the Church. Were those millions of earlier Christians immoral? I don't think so.
It depends on what you mean by church-sanctioned.
Prior to the Council of Trent, the Church would have recognized common law marriages as legitimate. While the form of the wedding may be somewhat different than that of today, having sex in a medieval common law marriage not the same as pre-marital sex.
That, and that most Christians would only require the marriage to be valid, not necessarily in the Church. For example, if two Hindus in India get married and then have sex, they wouldn't be having pre-marital sex, presuming their marriage is valid.