From the German Kobold (a gnome). The demon of mines. This metal was so called by miners, because it was long thought to be useless and troublesome. It was consequently attributed to the ill offices of the mine demon.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894