These two parables belong together as twin messages of the same truth. In the first parable a man finds treasure hidden in a field and sells all he has to buy that field. In the second a merchant comes across the finest pearl he has ever seen and does not hesitate to sell all he has to buy that pearl. Both men come across something of such great worth they are willing to exchange every worldly possession they own in order to have it. What may look like lunacy to an outsider makes perfect economical sense in their minds. The value of this discovered treasure makes everything else they own seem like rubbish. And at least in the case of the merchant, finding the pearl of great price was the culmination of a lifelong search. He would be a fool not to sell all he had in order to buy it.
To me there is no better summation of the Christian life than what is contained in these two brief parables. All that we call suffering and sacrifice is really, from the clear perspective of eternity, a smart economic exchange where you give up your copper coins for priceless jewels. Faith is what gives you the eyes to see the worth of this unseen treasure. Joy comes from recognizing the great bargain you are getting. Giving up worldly rags for heavenly robes? Forsaking passing pleasures for lasting joys? Leaving behind slavery to embrace sonship? Are you kidding? It's a deal.
But is this works salvation? Is Jesus saying that having the great treasure is conditioned upon whether you have paid the full price for it? That's reading too much into it. Jesus' narrow purpose in telling this parable is to show that the cost of discipleship is really a light and joyful burden when your eyes are fixed upon the prize that awaits you. The point is not that you literally pay for the prize, but to show through what you are willing to sacrifice how much faith you have in the tremendous value of the treasure.
But how does God's grace fit in to the teaching of this parable? It may help to understand that even before we have gone and sold everything to possess this treasure, the treasure is already freely given to us. God has already placed it in our possession. So why go and sell everything to gain what we already have? Because we seek to possess what we already possess. I'll say it again: we seek to possess what we already possess. We have it, therefore we are zealous to possess it daily, laboring to rid ourselves of the world so that we may be found to be worthy possessors. This paradox is really the secret of the Christian life, and it provides a window into the mystery of how God's grace meshes perfectly with our good works so that the former receives all the glory.