Biblical basis for the Immaculate Conception:

1) "I will put enmity between you [the Serpent] and the woman, and
between your seed and her seed, she [can also be read he] shall crush
your head and you shall bruise her [or his] heel."
    -Genesis 3.15

2) "He who commits sin is of the devil ..."
    -1 John 3.8

3) "Hail, full of grace [greek - kecharitomene], the Lord is with thee ..."
    -Luke 1.28

   From the above, we prove the doctrine of the Immaculate Conception.
   First, God has given the proto-evangel in Genesis 3.15, which is the
first promise of a savior, who will redeem mankind from the wiles of
Satan. "[Satan] was a murderer from the beginning, and has not stood in
the truth because there is no truth in him." John 8.44.  Now the
proto-evangel promises several things, enmity between Satan and "the
woman", and enmity between Satan and "her seed."  Now the woman is both
Eve (who is the immediate point of reference) and Mary, the second Eve. 
"Her seed" is Jesus Christ, and He is also at enmity with Satan in the
same way as Mary is said to be at enmity with Satan.  Thus, knowing as
we do that Jesus Christ is sinless (Hebrews 7.26), we can conclude that
Mary is also sinless because if she wasn't she would 1) not be at enmity
with the devil, as 1 John 3.8 tells us, and 2) the relation of her
sinlessness to Christ's sinlessness would be called into question, as
would God's veracity.  For God promised an enmity between Mary and the
serpent, and it is not possible for God to lie or be decieved.
    Second, we have the Angelic Greeting where Mary is called by the
Archangle Gabriel "full of grace."  As I pointed out above this is from
the Greek word "Kecharitomene" which means not just full of grace, but a
plenitude or perfection of grace.  The sense of it is best grasped by
the footnote to the Jerusalem Bible, "Hail you who have been and reamin
filled with grace."  But that is a little to long to say, so it is
reduced to full of grace.  And as it says, "you who have been" Mary had
always been filled with grace, from the moment of her conception, which
was also the moment of her salvation, until her death some years later.
    It must be admitted that it is possible that God could have done
what the doctrine of the Immaclute Conception says He did do.  And if
God could keep himself free from any contact with sin, through his
Mother, He would have, and the Bible records this fact, to which the
Fathers of the Church such as St. John Damascus, St. Augustine of Hippo
, St. Ambrose and others are in complete agreement with, as is all of
Christian tradition, and as is the infallible declaration of the Pope on
the matter in "Ineffibilus Deus."