Q: What happens to people that live their life giving love, taking care of others, and so on (by human standards are a "good" person), but never have the chance to hear the gospel or even know what a Bible is and then they die? I know God places an inherent yearning in our hearts for Him, but how does someone know to accept Christ as their Savior if they have never heard the Gospel?
Try as we may, we just can't get away from the nagging question of how God will deal with people who have lived a good life. Even those who know (theologically) that, technically speaking, no one is actually "good" from God's perspective, (Isaiah 64:6; Mark 10:18) we are still haunted by the idea that God would take a loving, caring human being who has demonstrated faithfulness and generosity and send them to a place of eternal punishment just because they had never responded to a Gospel they never got the chance to hear. It's unconscionable and we can't abide such a thought!
Your question raises two possibilities;
The first is that people are capable of a level of goodness that God—if He's truly fair—ought to recognize and reward with eternal life. And the second is that God is actually unfair and ignores human goodness, choosing instead to judge people on terms that may or may not be in our favor (depending on whether you've actually heard the Gospel).
Obviously both of these possibilities are false but they remain challenging questions nonetheless. The Bible makes it clear that people are not capable of a goodness that could ever earn us an eternal reward, and God also declares Himself perfectly fair and just. So how exactly does this whole thing work?
The short answer is that there is much mystery that faces us regarding how God exercises His amazing justice and kindness. But let me share with you the bread crumbs from God's Word that He has left for us which, I believe, lead us to a place where we can reach a conclusion.
Bread crumb #1: God wants us to be saved
Through the inspiration of the Holy Spirit, the Apostle Peter wrote a wonderfully comforting statement in his second letter that goes like this"
The Lord is not slow in keeping his promise, as some understand slowness. He is patient with you, not wanting anyone to perish, but everyone to come to repentance. 2 Peter 3:9 (NIV)
You and I can rest in the knowledge that God wants everyone to come to repentance and faith in His Son. That doesn't mean everyone will come to Christ, but it does mean God desires them to be saved.
Bread crumb #2: God comes to us
The book of Acts give us some amazing accounts of God actually bending over backwards to bring the good news to people who had a heart to receive. One was an Ethiopian eunuch and the other was a Roman Centurion, but in each case the Lord created circumstances in such a way that the Gospel came to them. In addition, lately we've been hearing amazing stories coming out of Muslim countries about people having dreams about the Person and work of Jesus Christ on the cross, and as a result they are coming to faith in Him. These stories reveal the heart of God toward mankind telling us that He will do whatever needs to be done to bring people to the place of salvation. The bottom line is that God is not limited in how the Gospel gets to people.
Bread crumb #3: God will do right
Abraham faced some of the same challenging questions that you're dealing with, specifically when it came to God's judgment upon a couple cities where his nephew happened to be living. God revealed that He was about to destroy those places due to their wickedness, so Abraham began to pepper God with questions about His fairness. He ended with this amazing question: "Will not the Judge of all the earth do right?" (Genesis 18:25) That wasn't so much a question as it was a declaration of faith in God's justice—as if to say, "It is impossible for you to do anything except that which is entirely good and correct."
I am convinced from my own study of the Scriptures that God is incapable of being unfair.
Bread crumb #4: God has revealed Himself in Creation
In Romans chapter one, the Apostle Paul writes about the revelation of God in Creation, and how, because of that, "...men are without excuse." It would seem from this passage that even in those areas where the Gospel has never been taken, God still has a means of determining a person's ultimate heart condition. How that judgment plays out and how the Lord completes their understanding of forgiveness through Christ we are not told. But there is enough information in those verses to help us to understand that God is not without options.
Obviously the preaching of the Gospel appears to be God's primary means of disseminating the message of the cross among people. But whenever or wherever that option isn't available, our God continues to possess unlimited resources for bringing people to faith in Christ. Even where we're unaware of God's hidden methods, we continue to trust His character and amazing love.