Acts 11:12 - “So if God gave them the same gift as He gave us, who believed in the Lord Jesus Christ, who was I to think that I could oppose God?”
Peter was raised to think one way. All of his life he had been taught that the Gentiles were nobodies and not to associate with them. If you asked him he would have told you that his beliefs about these people were from God. But then God tells him to go and visit them and minister to them.
Even though Peter doesn't understand, he obediently does what he is instructed. Then he sees that God has poured out His Spirit to these people, these Gentiles. That goes against everything he ever thought about the Gentiles.
Peter was challenged, but when it came down to it he knew it was God, because no one could receive the Spirit of God without God giving it to them. And, of course, he was not about to oppose God.
Our lesson in this is to always be open to change. Never think that you have it all figured out. You may have doing something one way for your entire life, and there was nothing specifically wrong with it, but now God is telling you to change. Be obedient. You do not want to find yourself fighting against God.
In this story of Peter we see that he was willing to change his views and God continued to use him to do great things. If you are obedient to God, He will use you in ways beyond what you could ever imagine.