The worldwide average cost to produce an ounce of gold is somewhere around $500/ounce...some producers are in the $400/oz range, some near the $1,000/oz. No one is going to commit CAPEX to a new project based on production costs greater than $1k/oz...investors won't and are not going for it because of the obvious risk.
Yeah, if the cost to mine the stuff were the same as or more than the market price, the mines would simply shut down. It's a commodity. The miners want to make money, too.
Some people wonder what would happen if the gold supply remained stagnant in such a case. Would there be enough gold? Yes. Any amount of gold can work to back the currency of any nation.
It would become more valuable with the higher demand, but that would only mean that its purchasing power would increase -- or, in other words, that the prices of goods would drop.