The basis for the belief in the Immaculate Conception of Mary can be found in the Biblical revelation of holiness and the opposite of that state, sinfulness.
God is revealed as perfect interior holiness.
No sin or anything tainted with sin can stand in the face of the holiness of God. "Enmity" is that mutual hatred between Mary and sin, between Christ and sin.
The salutation of the Angel Gabriel indicates that Mary was exceptionally "highly favored with grace" (Gk.: charitoo, used twice in the New Testament, in Lk 1:28 for Mary - before Christ's redemption; and Eph 1:6 for Christ's grace to us - after Christ's redemption).
The constant faith (paradosis) of the Church attests to the belief in the special preparation of the holiness of the person of Mary to bear in her body the most holy person of the Son of God.
I am fascinated with the concept of Mary bearing the child of God. It appears to me a logical argument that for her to bear a child by another man while the father of her first child was still living would open her to biblical accusation. And Jesus WAS the only BEGOTTEN of the Father.
It is a small step from there to the process by which Mary "came to be with Child of the Holy Ghost." If the Holy God cannot be in the presence of sin without the destruction of that sin from His presence, then what MUST we have the state of Mary being when she was "overshadowed by the Most High?" She must have been perfect in all her ways before God, the Father of her son, Jesus Christ.