I've seen the meme's on the Googles, but I think with a little extra foo (a partial search) I found the source:
In the Apostolic Creed we confess: "I believe in the holy Christian* Church." That means, I believe that there is no sin, no curse, no evil in the Church of God. Faith says: "I believe that." But if you want to believe your eyes you will find many shortcomings and offenses in the members of the holy Church. You see them succumb to temptation, you see them weak in faith, you see them giving way to anger, envy, and other evil dispositions. "How can the Church be holy?" you ask. It is with the Christian Church as it is with the individual Christian. If I examine myself I find enough unholiness to shock me. But when I look at Christ in me I find that I am altogether holy. And so it is with the Church.
Commentary on the Epistle to the Galatians - 1535
That's a commentary on Galatians 3: verse 13. Which Luther quotes in the same text as:
Christ hath redeemed us from the curse of the law, being made a curse for us: for it is written, Cursed is every one that hangeth on a tree.
* is there a creed that says "holy Christian church"?