Bottom 水 - the full standalone water glyph, the indexing radical. Unusually for a water character, 汞 keeps the upright 水 (not 氵) because the phonetic sits on top. Mercury is 'liquid metal' - the only metal flowing at room temperature, hence its place under 水 rather than 钅.
Top 工 supplies the sound - gōng shifts to gǒng, a tone-only change. 工 is a pictograph of a carpenter's square, but here it works purely as the phonetic. Same sound family includes 红 red, 江 river, 攻 attack, all sharing the gōng/-óng reading.