Colin Fine has already answered the question but I'm going to shed some light on its history.
Words that end with [ŋ] rather than [ŋɡ] in Modern English show the result of a sound change that occured in Modern English (I believe). Word-final <ng> used to be pronounced [ŋɡ] in Old and Middle English but due to a sound change in Modern English, it became [ŋ].
Examples: Hang, sing, king etc., had [ŋɡ] word-finally but they came to be pronounced with [ŋ] in Modern English (though many dialects such as West Midlands and North West England kept the pronunciation with [ŋɡ]).
[ŋg] mostly remained word-medially except in words with certain suffixes.
Examples: Finger, hunger, anger, linger etc., have [ŋg] word-medially.
In most cases, word-medial <ng> in some suffixed words did not become [ŋg]. I only know two of those suffixes*; -ing and -er.
Examples: Singer, singing, hanger, ringing etc.
Comparatives/superlatives have [ŋg] word-medially.
Examples: younger, longer, longest etc.
Hangover is a compound word of hang and over, 'hang' has [ŋ] so its compounds don't have [ŋɡ]. It seems that the [g] doesn't get fronted in compound words.
(Note that the pronunciation with [ŋɡ] can still be heard in many dialects.)
*I've heard derivational affixes to refer to that but I'm not entirely sure.
It's also explained briefly in Phonological variables and the sources of accent variables:
4.4. G-deletion (NG coalescence, Wells Vol. I)
- Distribution of [ŋg] and [ŋ] in Standard English accents such as RP and GenAm is basically that [g] does not occur after [ŋ] at the end of a morpheme:
a) no [ŋg] word-finally: tongue, swing, wrong, bang
b) [ŋg] in middle of morpheme: finger, hunger, anger, English, language, Hungary, bungle, linger.
c) no [ŋg] before inflection: sings, swinging, wronged, songs
Exceptions: comparative/superlative: younger, strongest, longest.
d) no [ŋg] before derivational affixes: singer, banger, songster, slangy, longish.
Exceptions: elongate, prolongation, %diphthongal, %diphthongise
As per Wikipedia:
The change in fact applies not only at the end of a word, but generally at the end of a morpheme. If a word ending in -ng is followed by a suffix or is compounded with another word, the [ŋ] pronunciation normally remains.
For example, in the words fangs, sings, singing, singer, wronged, wrongly, hangman, there is no [ɡ] sound.
An exception is the comparative and superlative forms of adjectives: in the words longer/longest, stronger/strongest, younger/youngest, the [ɡ] is pronounced in most accents.
Wikipedia calls it singer-finger split.