Jimmy Akin has a great series on the “Woman in Revelation”:
The Woman in Revelation 12 is part of the fusion imagery/polyvalent symbolism that is found in the book. She has four referents:
Israel, the Church, Eve, and Mary.
She is Israel because she is associated with the sun, the moon, and twelve stars. These symbols are drawn from Genesis 37:9–11, in which the patriarch Joseph has a dream of the sun and moon (symbolizing his father and mother) and stars (representing his brothers), which bow down to him. Taken together, the sun, moon, and twelve stars symbolize the people of Israel.
The Woman is the Church because, as 12:17 tells us, “the rest of her offspring” are those who bear witness to Jesus, making them Christians.
The Woman is Eve because she is part of the three-way conflict also involving her Seed and the Dragon, who is identified with the ancient serpent (the one from Eden) in 20:2. This mirrors the conflict in Genesis 3:15 between Eve, the serpent, and her unborn seed—which in turn is a symbol of the conflict between Mary, Satan, and Jesus.
Finally,
the Woman is Mary because she is the mother of Jesus, the child who will rule the nations with a rod of iron (19:11–16).
Because the Woman is a four-way symbol, different aspects of the narrative apply to different referents.
Like Mary, she is pictured as being in heaven and she flies (mirroring Mary’s Assumption).
Like the Church, she is persecuted by the Devil after the Ascension of Christ.
Like Israel, she experiences great trauma as the Messiah is brought forth (figuratively) from the nation.
And like Eve, it is her (distant) seed with which the serpent has his primary conflict.
Conversely, portions of the narrative do not apply to each referent. Mary did not experience literal pain when bringing forth the Messiah, but she suffered figuratively (the prophecy that a sword would pierce her heart at the Crucifixion). Eve did not ascend to heaven. And the Church did not bring forth the Messiah (rather, the Messiah brought forth his Church).
catholic.com/thisrock/1997/9705chap.asp