In Matthew 7 the Lord speaks of what it will take to enter the kingdom, and says not everyone that say unto me Lord, Lord will enter the kingdom, but he that will do the will of my Father in heaven, for many will say have we not prophecy in your name, cast out devils and healed the sick, did we not do great things in your name. Then I will say unto them I never new you, depart from Me you that worked iniquity. To understand the will of the Father and what a worker of iniquity is, we need to look at the wise builder and the foolish builder, the wise builder build his house on the rock, which is the word of Christ, and because his foundation was right he stood the test of time. The foolish builder build his house on the sand, which is the flesh, a carnal life, living life in the desires of the flesh, and not standing in the will of God, and to know God’s will we have to listen to the teaching of Christ and stand in it.
The record God gave concerning His Son was this is My beloved Son in whom I’m well pleased, listen to Him. There we have the will of God revealed through the life of Jesus Christ, as John 17vs3 says and this is life eternal, that they might know You, the only true God and Jesus Christ who You have send. So the knowledge of God is brought to us by Christ, us doing it is what will separate the goat’s from the sheep, the wise from the foolish.