Up to this point in 1 Corinthians, Paul has been teaching the Corinthians about the wisdom and foolishness of God as compared with the wisdom of men. The cross of Jesus is the foolishness of God, and it surpasses the wisdom of men (which fails utterly to understand God's purposes). The wisdom of God is the grace God gives His people to see the world in the light of His Spirit. Without His Spirit, we are blind to the purposes of God, but by the Spirit of God we can see begin to see things as God does and value them according to His purposes.
Now Paul brings the discussion back home to the issue which started the whole discussion in 1:10, that of factions within the Corinthian church. Paul reminds them that when he first came to Corinth as an evangelist it was only natural for him to speak to them as infants in Christ since they had only newly become believers. But he finds that years later he still must speak to them as infants because by their factionalism they betray the fact that they have not grown significantly in spiritual maturity since then. The Corinthians, by making a big issue out of who is their preacher of choice behave like toddlers who get more excited about the wrapping paper of their Christmas presents than about the present inside. What makes the preacher significant is not his eloquence or stature or social grace, but the power of God that is manifested through the message he carries. A farm laborer's hard work sowing and watering his fields would be useless if he was sowing gravel instead of wheat seed. The life is the essential thing, and that comes from God alone.
Paul then shifts the metaphor from farming to building, identifying his role as laying the foundation of Christ in the people's lives and leaving them with the opportunity and responsibility to build on that foundation. They first need to realize that, as Jesus also pointed out in Matthew 7:24-27, it is impossible to build anything that lasts on any other foundation than Christ. Many people have discovered in the recent rains the perils of building on insecure foundations, for a house can be completely destroyed when the ground shifts underneath. But even if we build on the good foundation, it matters what building materials we choose. Good materials (gold, silver, and costly stones) will survive the fires of God's testing, while bad materials (wood, hay and stubble) will be consumed in the fire, leaving us with only the original foundation. If we build our lives out of things that matter to God, then we will not lose these things when God tests us, while if we build on anything else, God's judgment will sweep it away as worthless.
This raises the natural question of how we distinguish the precious building materials from the worthless ones. In some circles, this distinction has been identified with godly vs. worldly activities, so praying and evangelizing were precious materials while dancing and playing cards were not. Others have distinguished between sacred and secular employment, so missionaries and pastors have built with gold, while grocery clerks and bankers have built with wood. But this does not seem to be the division that Paul is making. Jesus gives us a better view of the divide between precious and worthless labors in his encounter with the woman who poured perfume on his feet in Mark 14:3.
Putting perfume on a person's feet doesn't necessarily look like a very spiritual act. Dumping large amounts of perfume that would probably have cost over ten thousand dollars in today's money would look like an extravagant ostentatious waste - building with straw for sure. In the estimate of Judas and others of the disciples, the way to build with gold was to sell the perfume and give the proceeds to the poor. After all, isn't charity an obviously spiritual thing, and so pleasing to God?
That's not how Jesus saw it. He saw the heart of a woman who loved Him deeply and desired more than anything to give Him glory. As John tells us, this woman was Martha the sister of Lazarus. Not long before this Jesus had raised Lazarus from the dead. Martha's act sprang from a profound gratitude to Jesus for what he had done and a premonition of what He would yet do in raising us all to life on the last day (John 11:24). Nothing less than the best she had to give would even begin to do justice to the love and praise she had for Jesus, so she gave unstintingly to bring Him glory, and even, as Jesus said, to prepare for His death. Selling the perfume and giving the proceeds to the poor, while it would certainly mark the giver as a charitable person in the eyes of all the onlookers, would fail utterly to give Jesus the glory due him. The foolishness of Martha was far wiser in glorifying God than the wisdom of Judas (which only glorified himself).
We build with gold when we follow Martha's example of giving all we have to the glory of God. It doesn't have to be "spiritual" stuff like charity or prayer, indeed those things can be very strawy when we do them more to feel spiritual than to please God. If the Corinthians listened to Apollos preach because he helped them to grow in the knowledge of Christ, they built with gold, if they listened because he was the "cool" preacher that all the right people listened to, they built with straw. If we do our jobs well because it pleases God and provides a benefit to those we serve, we build with gold, while if we only care about impressing our bosses as a stepping stone to promotions and recognition, we build with stubble. If we play a musical instrument out of a desire to create something beautiful that reflects God's beauty, it is golden, while music that draws attention only to the virtuousity of the performer is straw.
Building with straw can be fun because we usually get recognition from the "right" people when we do it. But building with gold, though it may not be recognized (and may even be mocked) by the world, will be recognized by God and will endure when He comes to test our work. So Paul warns the Corinthians (and us too) to pay attention to how we build the things of our life, for in the end if we build poorly it will all be lost to our sorrow, while if we build well it will last for all eternity.