There are several assumptions that must be made before answering this question. First, there are several interpretations and religious beliefs about "God," who He is and how we prove that. Getting in to the apologetics of one religion over another sidesteps greatly from the original question, so in this answer, understand I will be adhering to the Christian belief that "God" is the God of the Bible and the Bible is a holy scripture that is, by itself, the truth. If you wish to answer this question from a different religious belief or background, I encourage you to re-post a more specific question.
Generally speaking, common law here in America does not allow for "ignorance" of a law to be a valid defense against guilt. If the law is published, citizens are expected to have "constructive knowledge" of right and wrong and are held to such an expectation in court, even if they plead ignorance.
Christians might argue that believers are held to a similar standard, and the Bible is the "rule book" for which we must possess constructive knowledge. The God of the Christian Bible, however, is not a God of punishment, but a God of grace and forgiveness. He does not simply "let one slide" for ignorance, but rather, provided forgiveness for all sin (done in ignorance or not) when he sent his son Jesus to die on the cross.
Christians believe that no matter what humans do, how hard they strive, nor how good intentioned they may be, people are still sinners in need of forgiveness. Humans simply cannot be "good enough" to be as perfect as God. Romans 3:23 says, "For all have sinned and fall short of the glory of God."
However, Christians also believe that God loves people in spite of their sin, or their ignorance. Romans 5:8 says, "But God shows his own love for us in this: while we were still sinners, Christ died for us." Jesus' death on the cross, in the Christian belief, was the ultimate sacrifice for human sin. Because of this, everyone is able to enter heaven and share in God's glory eternally.
There is, however, one caveat to this. Christians believe that "ignorance" is not a valid plea for innocence. They believe that all humans have the opportunity while on Earth to make a choice. Christians believe that God expects people to believe and accept his son Jesus Christ and what he did on the cross as truth. John 1:12 says, "Yet to all who received him, to those who believed in his name, he gave the right to become children of God." This is why so much time, effort, and money is spent on mission work and evangelism in the Christian faith.