This is often a tricky subject - many Goths are highly unimpressed that Goth and metal music and culture are often lumped together by both mallgoths and the mainstream, and often react with disdain towards metal music as a whole. But on the other hand, a lot of Goths take a lot of enjoyment in metal music and culture, and will cheerfully (OK, perhaps not 'cheerfully', we are Goths after all ;-) ) attend metal nights and metal festivals as well as specifically 'Goth' events.
That would be the short version.
Of course, nowadays there are dozens (if not more) subgenres of metal, such as Gothic metal, symphonic, thrash, death metal, glam metal, folk metal, nu-metal, metalcore, Industrial metal, rap metal, progressive metal, Viking metal and many more. Many of these are popular amongst Goths as well as metalheads, and will be featured in upcoming 'dark and Goth-friendly' music guides.
Visual imagery has played a large role in the development of metal and is possibly the main reason why it has become so strongly associated with the Goth subculture. Some notable metal acts such as Alice Cooper and Lordi (another two favourites of mine...) are known for their appearance just as much as their music. Album art and music videos frequently display dark or disturbing themes.
The metalhead subculture is described as being predominantly 'young, white and male... but tolerant of those outside its core demographic base who follow its codes of dress, appearance, and behavior.' Of course, this is a huge generalisation - metal has an ever-increasing female following, and you don't have to be under thirty or white to enjoy metal. Or any genre of music, come to that.
Unlike the androgyny commonly associated with Goth, male metalheads often dress in a manner reflecting the masculinity and machismo often seen (or rather, heard) within the metal genre. Key themes in male metalhead fashion include long hair, leather jackets and band patches. For both men and women, metalhead fashion is often similar to Goth fashion, incorporating lots of eyeliner, black clothing, heavy boots, studs, spikes and fishnets. However it tends to be simpler, and more 'hard' than elegant. For metalhead women, the 'femme fatale' Goth fashion is more often seen than, for example, the lace and velvets of romantigoth. I chose the images on this page because the people in them could easily be associated with either the Goth OR metal subculture.
Metal bands that are popular amongst Goths tend to be those known for gloomier, more atmospheric music; a dark or dramatic stage persona; or those with melancholy (or black-humoured) lyrics. Popular subgenres tend to include Industrial metal, symphonic, operatic or Gothic metal, and black metal. Just off the top of my head: Rob Zombie, Iron Maiden, Alice Cooper, Nightwish, Theatres Des Vampires, Cradle of Filth, Dimmu Borgir, After Forever, Type O Negative, Paradise Lost, Sepultura, Therion, Slipknot, Children of Bodom and Within Temptation all have a sizeable Goth following.
The two subcultures are indeed closely related; after Industrial, nowadays the metal scene is probably Goth's closest cousin. There are many clubs and events that cater to both groups, many bands (such as those above) with crossover appeal, and many Goths who are also fans of metal music. But listening exclusively to metal music does not a Goth make (a common mistake amongst mallgoths is to assume that metal music is Goth). I have heard of fans of both genres referring to themselves as 'metal Goths', which is as good a description as any.
Some Goths can be very purist and do not appreciate the amount of crossover with the metal scene; I once read on a forum that somebody was bitched at by a fellow Goth for daring to wear a Dragonforce T-shirt into a Goth club. But in today's scene I would guess that a good half of the Goth community has at least a scattering of metal music in their collection.
Goth gossip: Fans of gothic metal, doom metal, black metal, Goth rock, darkwave, emotive hardcore and other generally 'gloomy' music will be pleased to hear that what your parents tell you (even my very open-minded mother has trotted out this line on occasion) is not true: dark, gloomy, 'depressing' or heavy music DOES NOT and WILL NOT cause depression. In fact, if you love it, it will actually be making you happier every single time you listen to it. Check out the proof here.