It's because of Gothic literature that was gloomy, dark, and morbid, Gothic literature is called Gothic after Gothic cathedrals which were named after the goths of the dark ages.
Than there came to be the music genres of Gothic Rock, Deathrock and Industrial, those genres heavily got inspiration from Gothic literature, which led to the musicians of this genre to dress dark and gloomy.
fans of the bands that made this music copied the musicians and member's of these bands clothing style, and the whole makeup and extreme fashion thing was inspired by Punk Rock's extreme fashion styles.
some people gravitated from Punk to Goth because they believed Punk was dead and moved on to goth.
This happened because when goth 1st began it was a revival of Punk culture.
The reason goth is called goth is just because of the term Gothic for centuries was being thrown around a lot and being used to refer to dark things.