Those gold-colored bits of mineral shining attractively in your gold pan may be gold, or they may be iron pyrite cunningly disguised as gold. The canny prospector has a few different tests at his disposal to figure out if he has got his hopes up for nothing or if he has indeed struck it lucky. Most of the tests involve using common household tools or simply knowledge of the specific characteristics of the mineral that turns gold millionaires into fools.
Check the color of the mineral closely if the grains are large enough. If the "gold" is in fact golden or even silvery yellow, it may be actual gold. Iron pyrite is a slightly different brassy color, ranging from pale to medium brassiness. Iron pyrite also has more of a crystal structure (regular shapes such as a cube or an octahedron) than gold. Gold occurs most often in nuggets, sheets, small flakes and shapeless grains. Gold is rarely found in a crystal structure. Iron pyrite may also occur in shapeless grains.
Scratch large samples with a knife. Gold can be cut, leaving a residue of yellow powder but iron pyrite is harder and cannot be scratched with a knife.
Hit the sample with a steel hammer if it is a large enough nugget. Gold is malleable and softer than iron pyrite. The iron pyrite will shatter and sparks can be given off, but the gold will simply deform instead of shattering. For smaller samples, use a tweezers to check brittleness of the sample.
Rub the larger nugget-like particles with a hard surface. If a sulphur (eggy) smell is given off, the sample is probably iron pyrite. Gold will not give off a smell.
Check that the substance has settled to the bottom of the pan. Gold is heavier than iron pyrite and if the "gold" rises to the top and floats off when you shake and swirl the pan, it is probably iron pyrite or another metal.
Use a magnet on the sample. Iron pyrite is sometimes magnetic and gold is never magnetic. If the "gold" sticks to the magnet, transfer it to another pan and shake and swirl the pan again. Occasionally gold may get caught up with the magnetic sediment and stick to the magnet in a clump of sand. Repeating the magnet step one or more times will ensure the "gold" is definitely magnetic and therefore definitely not gold.
Drop some hydrochloric acid on the sample. Iron pyrite will foam and dissolve, but gold will remain unaffected.