Dupin is not telling Prefect G- that the answer to a problem is always obvious. What he is saying is that people often make problems more complicated than they actually are. The truth is often very simple, and it becomes "obvious" once it is discovered.
A good example would be the Ptolemaic model of the solar system which was the only accepted model for centuries. It was based on the assumption that the earth was stationary and that everything else revolved around it. This theory required elaborate and mysterious explanations of the movements of the planets, because they sometimes seems to turn around and go backwards in their orbits. Once Copernicus explained that the sun was the center of the solar system and the earth was only one of the planets that revolved around it, the truth became simple and obvious.
The same was the case when Charles Darwin explained the origin of species through natural selection. Monsieur G- is a good example of the stubbornness of much of humanity, as shown in the following quotes:
"Perhaps it is the very simplicity of the thing which puts you at fault," said my friend.
"What nonsense you DO talk!" replied the Prefect, laughing heartily.
Monsieur G- might be said to represent all the authorities who hold back human progress because the truth threatens their positions of power and hence threatens their pocketbooks. The Prefect acts amused, but he is not. In a pseudo-good-natured manner he insults Dupin's intelligence--even though he has really come to Dupin for help. Dupin waits for G- to leave before explaining to his friend how he found the letter; he knows that G- would never believe it as hidden in plain sight because he would not want to believe it. He would attribute Dupin's solution of the mystery to chance or luck. As Milton puts it:
Truth . . . never comes into the world but like a bastard, to the ignominy of him that brought her forth. John Milton