The question likely says it all, but, in the treasure room in the Sanctuary is a key up high. As you gather money, the pile grows and you can climb on it. I'm wondering exactly how much gold you are required to accumulate to be able to reach the key. I assume the key opens the chest in the same room at the bottom of the pile.
The number is exactly 5 million. The key will appear to disappear when you reach this amount, but it is not treated as a regular gold key you can pick up and store. When the key has disappeared, this means you can successfully open the chest if you get rid of all of your money.
You don't have to get rid of all of it to access the chest, but I think anything over 100,000 in your personal stash renders it unobtainable.