The Apostle Paul loves the church in Galatia. So he talks clearly to them. He reminds them that it was through seeing Jesus Christ crucified (by hearing the message of the gospel) that they received the spirit. It was not by being obedient to the law.
There's a warning here for us. For if the Galatians could be so bewitched, then it's possible for us to be led astray as well.
Galatians 3:1 You foolish Galatians! Who has cast a spell on you, before whose eyes Jesus Christ was publicly portrayed as crucified? 2 I only want to learn this from you: Did you receive the Spirit by the works of the law or by believing what you heard?