I was reluctant to post this answer in view of a good answer posted by @David but thought it would be better if it is clarified a little more.
The essence of original sin consists in the deprivation of sanctifying grace, and its stain is a corrupt nature. Mary was preserved from these defects by God's grace; from the first instant of her existence she was in the state of sanctifying grace and was free from the corrupt nature that original sin brings. Mary therefore says:
Luke 1:47 and my spirit has begun to rejoice in God my Savior,
Some argue that this indicates that Mary was sinner, since only sinners needs a saviour. But it is not so. Like all other descendants of Adam, she was subject to the necessity of contracting original sin. But by special intervention of God, undertaken at the instant she was conceived, she was preserved from the stain of original sin and its consequences. She was therefore redeemed by the grace of Christ, but in a special way ---by anticipation.
To quote an analogy that I read: Suppose a man falls into a deep pit and someone reaches down to pull him out. The man has been saved from the pit. Now imagine a woman walking along and she is about to topple into the pit, but at the very moment that she is to fall in, someone holds her back and prevents her. She too has been saved from the pit, but in an even better way: She was not simply taken out of the pit; she was spared from getting strained by the mud in the first place. In this way God became her saviour in a special way and hence her exclaim. She has more reason to call God her saviour than we do, because He saved her in an even more glorious manner.
As per New Advent, the formal active essence of original sin was not removed from her soul, as it is removed from others by baptism; it was excluded, it never was in her soul. Simultaneously with the exclusion of sin. The state of original sanctity, innocence, and justice, as opposed to original sin, was conferred upon her, by which gift every stain and fault, all depraved emotions, passions, and debilities, essentially pertaining to original sin, were excluded. But she was not made exempt from the temporal penalties of Adam — from sorrow, bodily infirmities, and death.