From early on in the history of the Catholic Church, the writings of numerous Church Fathers are cited as places where this belief is implicitly stated. For many centuries there have been regional and local liturgical celebrations of a feast day in honor of Mary. To sum up a rather complicated subject in a few words, the Roman Catholic Church has used as its theological basis for this belief the writings of St. Augustine of Hippo, great 4th century Western Father of the Church. It wasn't until December 8, 1854, relatively recently, that the Immaculate Conception was solemnly defined as an official teaching and matter of faith of the Church by Pope Pius IX.
Orthodox Christianity has seen all this from a very different viewpoint. It views the teaching of the "Immaculate" Conception of Mary as a response to a situation created by the Roman Catholic dogma of original sin. Following Augustine, Rome teaches that man inherits from Adam a "stain" of original sin, primarily manifested in concupiscence, the tendency to sin. So Rome had to provide an explanation of how Christ could be born of a human parent, yet without sin. The teaching of the Immaculate Conception tries to break this chain by making Mary the exception, not Christ.
In the East, Eutyches [c. 380—c. 456, a presbyter and archimandrite at Constantinople, and later condemned as a heretic] had argued that, if Christ had a real human nature, he would also have inherited the stain of sin. Pope Leo the Great countered by making a distinction between the nature, which Christ did indeed assume from Mary, and the guilt which He did not assume, "because His nativity is a miracle". There was never any idea of Mary's own preservation from original sin. In one of Leo's sermons (62,2) we read: "Only the Son of the blessed Virgin is born without transgression; not indeed outside the human race, but a stranger to sin... so that of Adam's offspring, one might exist in whom the devil had no share."
The Orthodox Church's theological basis for understanding Mary's conception is based heavily on the theology of St Athanasius, specifically his treatise On the Incarnation. There Athanasius holds that, when man, in the persons of Adam and Eve who have passed on to us our human nature, first sinned, man became separated from God. This separation from God is what Orthodox Christianity understands as the "original sin", having two consequences. First, separated from the source of all good, man becomes morally corrupt, with an innate tendency to sin. Secondly, separated from the source of all Being, man begins to return to his original state, i.e., to the nothingness from which God created him. Thus, the corruption and death experienced by humankind. In other words, "original sin", in the Orthodox understanding, isn't a "stain" but rather an absence. Given that, there's no need to explain how Christ failed to inherit it along with his human nature from Mary, because the Incarnation itself is the end of the separation. From the moment of incarnation, Jesus Christ was both God and man. Therefore, his human Nature never experienced the separation from God which all other humans have experienced since the Fall. Christ does not give us life and righteousness as things apart from himself. He is our life and righteousness. The Orthodox Christian view would not say that the Roman Catholic dogma of the Immaculate Conception is wrong per se, but rather that it makes no sense theologically if the understanding of original sin is more from Athanasius than from Augustine.
Even Christ's ancestral lineage wasn't distinguished for holiness. Indeed, the lineage isn't through the favored son, Joseph, but through Judah, whose casual sin with his daughter-in-law, Tamar, was less than edifying. Matthew mentions four women in Christ's genealogy, all of them of questionable reputation. 1) Tamar, who enticed her father-in-law into sleeping with her. 2) Rahab, the prostitute. 3) a former pagan, Ruth. 4) Bathsheba the adulteress. Matthew seems to want his readers to be aware that it's not Christ's ancestry which makes him the Savior.