And just as through a disobedient virgin man was stricken down and fell into death, so through the Virgin who was obedient to the Word of God man was reanimated and received life. For the Lord came to seek again the sheep that was lost; and man it was that was lost: and for this cause there was not made some other formation, but in that same which had its descent from Adam He preserved the likeness of the (first) formation. For it was necessary that Adam should be summed up in Christ, that mortality might be swallowed up and overwhelmed by immortality; and Eve summed up in Mary, that a virgin should be a virgin’s intercessor, and by a virgin’s obedience undo and put away the disobedience of a virgin. [St. Irenaeus, Demonstration of the Apostolic Preaching, 33; emphasis added]As Pelikan says in comment upon this remarkable passage,
It was absolutely essential to the integrity of the two narratives [viz., that of Genesis 3 and Luke 1] that both the disobedience of Eve and the obedience of Mary be seen as actions of a free will, not as the consequences of coercion, whether by the devil in the case of Eve or by God in the case of Mary. [Mary Through the Centuries, p. 43]He continues:
It is difficult...to avoid the impression that [Irenaeus] cited the parallelism of Eve and Mary so matter-of-factly without arguing or having to defend the point because he could assume that his readers would willingly go along with it, or even that they were already familiar with it. One reason that this could be so might have been that, on this issue as on so many others, Irenaeus regarded himself as the guardian and transmitter of a body of belief that had come to him from earlier generations, from the very apostles. [ibid.; cf. also Pelikan, The Emergence of the Christian Tradition, 241]It's likewise important to emphasize the importance to the parallel of the Blessed Virgin's fiat being no less free than was Eve's sin. Pelikan returns to this theme on p. 87 of Mary:
As free will could not be taken away from Eve in order to say that she was not accountable for her actions, so it could not be taken away from Mary either, in a misguided attempt to make the grace of God seem greater by minimizing or denying the human free will.And once more from St. Irenaeus, this time from Against Heresies:
That the Lord then was manifestly coming to His own things, and was sustaining them by means of that creation which is supported by Himself, and was making a recapitulation of that disobedience which had occurred in connection with a tree, through the obedience which was [exhibited by Himself when He hung] upon a tree, [the effects] also of that deception being done away with, by which that virgin Eve, who was already espoused to a man, was unhappily misled—was happily announced, through means of the truth [spoken] by the angel to the Virgin Mary, who was [also espoused] to a man. For just as the former was led astray by the word of an angel, so that she fled from God when she had transgressed His word; so did the latter, by an angelic communication, receive the glad tidings that she should sustain (portaret) God, being obedient to His word. And if the former did disobey God, yet the latter was persuaded to be obedient to God, in order that the Virgin Mary might become the patroness (advocata) of the virgin Eve. And thus, as the human race fell into bondage to death by means of a virgin, so is it rescued by a virgin; virginal disobedience having been balanced in the opposite scale by virginal obedience. For in the same way the sin of the first created man (protoplasti) receives amendment by the correction of the First-begotten, and the coming of the serpent is conquered by the harmlessness of the dove, those bonds being unloosed by which we had been fast bound to death. [Against Heresies, V.xix.1; emphasis added]Note that Pelikan (Mary, p. 87) rightly insists on the fact that Mary's free choice is a necessary aspect of the parallel between her and Eve.
So we see that Mary was understood to be the second Eve no later than the second century.