In the context of this thread, "doing" to be justified is excluded, but believing is not. So there is no "doing" involved.
This only would I learn of you, Received ye the Spirit by the works of the law, or by the hearing of faith?... Christ is become of no effect unto you, whosoever of you are justified by the law; ye are fallen from grace.
Had Paul used the word "departed" instead of "fallen" it would have been very clear as to what he is saying. The Galatians had heard the Gospel of grace -- that sinners are justified by grace through faith PLUS NOTHING. Along came the Judaizers and said, "No that is not enough. Unless you obey the Law of Moses (which includes circumcision) you cannot be saved". So this is what Paul was addressing. We already know that no sinner could be justified by the works of the Law. But if people went back to Torah observance after having heard the Gospel of grace, they had "departed" or "fallen" from grace, and for them salvaton would become a "reward" rather than a gift of God's grace.
This does not mean that good works or works of the Law are condemned. What it does mean is that they are totally useless in order to be justified. Furthermore, the Old Covenant and its ceremonial observances (including circumcision) have been rendered null and void by the New Covenant. The moral and spiritual Law (the Ten Commandments) cannot become null and void.