It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so.
Ignorance is rarely the real danger; false certainty is. When we know we don't know something, we move carefully, ask questions and double-check. When we feel sure of something that is actually wrong, we stop looking, and we act with full confidence in the wrong direction. The trouble comes from the gap between how certain we feel and how correct we are.
The idea echoes Socratic humility, the old view that wisdom starts with recognizing the limits of what we know. It also fits the skeptical, anti-pretense spirit of Twain's writing, which loved poking at received wisdom. Still, the attribution is doubtful: the line is popularly credited to Twain, but no reliable source in his work has been found, and similar sayings were circulating in his era.
Today, you might apply it by testing one firmly held belief before a big decision. Say you're certain a certain neighborhood is unsafe, or that a particular investment "always goes up." Ask yourself, "How do I actually know this?" Then look for one piece of evidence that could prove you wrong. Often you'll be right, but sometimes you'll be glad you checked.