Did Mary, sister of Martha, anoint Jesus's feet on two different occasions, John 11:1-2 and John 12:2-5?
The Catholic Church has no definitive interpretation on this subject and both views are permitted. However the Church does favour the opinion that there may have been two separate anointing scenarios.
How does the Catholic Church explain the positioning of John 11:2 before John 12:3 ?
Here follows how:
Mary Magdalen May have anointed Jesus on more than one occasion.
Here is what the Catholic Encyclopedia has to say about St. Mary Magdalen:
In the New Testament she is mentioned among the women who accompanied Christ and ministered to Him (Luke 8:2-3), where it is also said that seven devils had been cast out of her (Mark 16:9). She is next named as standing at the foot of the cross (Mark 15:40; Matthew 27:56; John 19:25; Luke 23:49). She saw Christ laid in the tomb, and she was the first recorded witness of the Resurrection.
The Greek Fathers, as a whole, distinguish the three persons:
On the other hand most of the Latins hold that these three were one and the same. Protestant critics, however, believe there were two, if not three, distinct persons. It is impossible to demonstrate the identity of the three; but those commentators undoubtedly go too far who assert, as does Westcott (on John 11:1), "that the identity of Mary with Mary Magdalene is a mere conjecture supported by no direct evidence, and opposed to the general tenour of the gospels." It is the identification of Mary of Bethany with the "sinner" of Luke 7:37, which is most combatted by Protestants. It almost seems as if this reluctance to identify the "sinner" with the sister of Martha were due to a failure to grasp the full significance of the forgiveness of sin. The harmonizing tendencies of so many modern critics, too, are responsible for much of the existing confusion.
The first fact, mentioned in the Gospel relating to the question under discussion is the anointing of Christ's feet by a woman, a "sinner" in the city (Luke 7:37-50). This belongs to the Galilean ministry, it precedes the miracle of the feeding of the five thousand and the third Passover. Immediately afterwards St. Luke describes a missionary circuit in Galilee and tells us of the women who ministered to Christ, among them being "Mary who is called Magdalen, out of whom seven devils were gone forth" (Luke 8:2); but he does not tell us that she is to be identified with the "sinner" of the previous chapter. In 10:38-42, he tells us of Christ's visit to Martha and Mary "in a certain town"; it is impossible to identify this town, but it is clear from 9:53, that Christ had definitively left Galilee, and it is quite possible that this "town" was Bethany. This seems confirmed by the preceding parable of the good Samaritan, which must almost certainly have been spoken on the road between Jericho and Jerusalem. But here again we note that there is no suggestion of an identification of the three persons (the "sinner", Mary Magdalen, and Mary of Bethany), and if we had only St. Luke to guide us we should certainly have no grounds for so identifying them. St. John, however, clearly identifies Mary of Bethany with the woman who anointed Christ's feet (12; cf. Matthew 26 and Mark 14). It is remarkable that already in 11:2, St. John has spoken of Mary as "she that anointed the Lord's feet", he aleipsasa; It is commonly said that he refers to the subsequent anointing which he himself describes in 12:3-8; but it may be questioned whether he would have used he aleipsasa if another woman, and she a "sinner" in the city, had done the same. It is conceivable that St. John, just because he is writing so long after the event and at a time when Mary was dead, wishes to point out to us that she was really the same as the "sinner." In the same way St. Luke may have veiled her identity precisely because he did not wish to defame one who was yet living; he certainly does something similar in the case of St. Matthew whose identity with Levi the publican (5:7) he conceals.
If the foregoing argument holds good, Mary of Bethany and the "sinner" are one and the same. But an examination of St. John's Gospel makes it almost impossible to deny the identity of Mary of Bethany with Mary Magdalen. From St. John we learn the name of the "woman" who anointed Christ's feet previous to the last supper. We may remark here that it seems unnecessary to hold that because St. Matthew and St. Mark say "two days before the Passover", while St. John says "six days" there were, therefore, two distinct anointings following one another. St. John does not necessarily mean that the supper and the anointing took place six days before, but only that Christ came to Bethany six days before the Passover. At that supper, then, Mary received the glorious encomium, "she hath wrought a good work upon Me . . . in pouring this ointment upon My body she hath done it for My burial . . . wheresoever this Gospel shall be preached . . . that also which she hath done shall be told for a memory of her." Is it credible, in view of all this, that this Mary should have no place at the foot of the cross, nor at the tomb of Christ? Yet it is Mary Magdalen who, according to all the Evangelists, stood at the foot of the cross and assisted at the entombment and was the first recorded witness of the Resurrection. And while St. John calls her "Mary Magdalen" in 19:25, 20:1, and 20:18, he calls her simply "Mary" in 20:11 and 20:16.
Catholic Culture has this to add:
Moreover, in John 11, the earlier scene where Jesus raised Lazarus from the dead, the Gospel reads, "There was a certain man named Lazarus who was sick. He was from Bethany, the village of Mary and her sister Martha. This Mary whose brother Lazarus was sick was the one who anointed the Lord with perfume and dried His feet with her hair" (Jn 11:1-2). Here Mary is identified as "the one who anointed the Lord." While some speculate that this identification in John 11 refers to the subsequent anointing in John 12, why would John need to make such a reference when the story of John 11 flows right into the story of John 12? More likely, the identification refers to a previous action, namely the story at the home of Simon the Pharisee.
If this argument holds, then Mary Magdalene, the penitent woman, and Mary of Bethany are the same. Granted, we are still left with a little mystery. Nevertheless, I personally agree with Pope St. Gregory, who concluded, "She whom Luke calls the sinful woman, whom John calls Mary [of Bethany], we believe to be the Mary from whom seven devils were ejected according to Mark" (Homilies on the Gospels). St. Mary Magdalene, the repentant sinner, who found both forgiveness and friendship with our Lord, who stood faithfully at the foot of the cross, and who saw the risen Lord, is a powerful example for each believer.
More information may be gleaned below:
St. Mary Magdalene and the insanity of modern Catholic biblical scholarship
Was Jesus anointed once or twice on the feet with perfume?