Matthew 22:1-14 (DRB)
And Jesus answering, spoke again in parables to them, saying: 2 The kingdom of heaven is likened to a king, who made a marriage for his son. 3 And he sent his servants, to call them that were invited to the marriage; and they would not come. 4 Again he sent other servants, saying: Tell them that were invited, Behold, I have prepared my dinner; my beeves and fatlings are killed, and all things are ready: come ye to the marriage. 5 But they neglected, and went their ways, one to his farm, and another to his merchandise. 6 And the rest laid hands on his servants, and having treated them contumeliously, put them to death. 7 But when the king had heard of it, he was angry, and sending his armies, he destroyed those murderers, and burnt their city. 8 Then he saith to his servants: The marriage indeed is ready; but they that were invited were not worthy. 9 Go ye therefore into the highways; and as many as you shall find, call to the marriage. 10 And his servants going forth into the ways, gathered together all that they found, both bad and good: and the marriage was filled with guests. 11 And the king went in to see the guests: and he saw there a man who had not on a wedding garment. 12 And he saith to him: Friend, how camest thou in hither not having on a wedding garment? But he was silent. 13 Then the king said to the waiters: Bind his hands and feet, and cast him into the exterior darkness: there shall be weeping and gnashing of teeth. 14 For many are called, but few are chosen.
This parable—while not overtly—quite obviously refers to the eschatological event known as the marriage feast of the Lamb referred to in Revelation:
Revelation 19:7-9 (DRB) Let us be glad and rejoice, and give glory to him; for the marriage of the Lamb is come, and his wife hath prepared herself. 8 And it is granted to her that she should clothe herself with fine linens, glittering and white. For the fine linen are the [righteous deeds] of saints. 9 And he said to me: Write: Blessed are they that are called to the marriage supper of the Lamb. And he saith to me: These words of God are true.
It can safely be said this event refers to nothing other than the ultimate and lasting union of Christ and His Bride (i.e. the Church), of which the nuptial union is a perfect metaphor (the husband and wife becoming one [flesh]
after a marriage ceremony).
It's not usual that parable correspond so directly in their elements with the truths spoken of by means of them, but here it is very plain this is the case:
The "king" is God, and He has a mind to prepare a marriage feast for His "Son," Jesus Christ. God then sends His "servants," his prophets or apostles (Amos 3:7), to call "them that were invented," the Jews (Matthew 15:24). When they reject, they are called by "other servants," the apostles (2 Peter 1:1). They nonetheless do not want to pay heed; in fact, some put to death the servants He sent to them (Acts 7:57). Thus, God, "the king," sent destroyers to destroy "their city," Jerusalem, "that killest the prophets, and stonest them that are sent unto thee" (Matthew 23:37) (cf. Josephus, The Jewish War, Book VII). The Jews who rejected the King's Son are counted unworthy of the marriage feast (i.e., ultimately, heaven). Therefore, the Gentiles are called, those that are in the highways or streets (Romans 11:19): all kinds of men in all kinds of condition are invited and come. Many are called to attend, but few are eklektoi—"chosen" (Romans 11:7), and it hinges upon whether they appear clad with a "wedding garment," which are their dikaiomata or "good deeds," (Revelation 19:8) significant of the fruit of one spiritually alive, and thus by extension, born again in Christ (Ephesians 2:10; Romans 2:7). The "outer darkness," outside the limits of the venue of the Eternal Feast, heaven, is of course hell.
It appears that in this parable, the phrase "how did you get in without..." is necessary insofar as it demonstrates the unworthiness of the guest without the garment, rather than that he entered heaven really only to be cast out again. Or, alternatively, it could signify someone who has been "made partakers of the Holy Ghost" and fallen away, "rejected and ready to be cursed, whose end is to be burnt" (Hebrews 6:4-8).
Without doubt or controversy, the righteousness of Christ, "the blood of Christ," is what produces the righteous deeds of the saints. That's why it says they were clothed and doused in His saving blood (Revelation 1:5).
Revelation 7:14 (DRB) And I said to him: My Lord, thou knowest. And he said to me: These are they who are come out of great tribulation, and have washed their robes, and have made them white in the blood of the Lamb.
So the robes are white because they have been cleansed of theirs sins in His blood, and yet in the sense that they can tarnish or defile their garments (Revelation 3:4), their bad works are not compatible with righteousness, and so works correlating directly to their righteousness, it must be said that the robes are white, too, because of their deeds; the same blood forgave them making them right before God, as did enable them to live righteously themselves (Matthew 5:20). It is this sense in which Revelation 3:4 is meant with regard to the behaviour of those at Sardis:
Revelation 3:4 (DRB) But thou hast a few names in Sardis, which have not defiled their garments: and they shall walk with me in white, because they are worthy.
That is to say, we can 'earn' our way to hell by forfeiting the clean state by sin, but we cannot earn that clean state (either initial forgiveness, or forgiveness when we sin afterwards: Matthew 6:9, 12, 14)—that is the role of grace, and that was earned for us by the only One who could earn anything from God as man, "the man Christ Jesus," who alone reconciles God to man (1 Timothy 2:5-6a; Hebrews 9:22). All that the Bride has, "was given to her" (Revelation 19:8).