In Single Player, dying will not take away all your gold. No gold is lost from your Stash, and 500 gold per character level is exempted from the death penalty. For example, if a 10th level Single-Player character with 5,000 gold dies, he will lose no gold.
As an additional penalty, when playing in Nightmare or Hell difficulty, your character will lose some experience when he dies. However, this will never cause your character to drop down to a lower level.
For information on Hardcore characters and games, check the Hardcore page.