das Gegenstück
counterpart
A part, person, or thing that complements another, corresponds to it, or forms a pair with it.
Der linke Handschuh ist das Gegenstück zum rechten.
The left glove is the counterpart to the right one.

counterpart
Loading your saved state.
counterpart
A part, person, or thing that complements another, corresponds to it, or forms a pair with it.
Der linke Handschuh ist das Gegenstück zum rechten.
The left glove is the counterpart to the right one.

The word is made up of 'gegen' (against/opposite) and 'das Stück' (the piece). So it literally describes a 'piece that stands opposite another'—either as a complement or as a contrast.
Für das kaputte Scharnier brauchen wir das passende Gegenstück.
For the broken hinge, we need the matching counterpart.
To say what something is the counterpart to, you use the preposition 'zu' followed by the dative. This construction is very common.
Dieses moderne Gebäude ist das Gegenstück zu den alten Fachwerkhäusern in der Straße.
This modern building is the counterpart to the old half-timbered houses on the street.
When 'Gegenstück' describes a contrast or an opposite, it is often strengthened by adjectives such as 'genau' (exact) or 'direkt' (direct). If such a word is missing, it is often about a complement.
Ihr optimistischer Blick auf die Zukunft ist das genaue Gegenstück zu seinem Pessimismus.
Her optimistic view of the future is the exact opposite of his pessimism.
In the meaning 'complementary part', the word is often combined with verbs such as 'suchen' (to look for), 'finden' (to find), or 'fehlen' (to be missing). The adjective 'passend' (matching) is also very typical.
Mir fehlt das Gegenstück zu diesem Ohrring.
I'm missing the counterpart to this earring.
opposite / contrast
'der Gegensatz' and 'das Gegenstück' can both describe something that stands in relation to something else. 'der Gegensatz' emphasizes the strong difference or the opposite. 'das Gegenstück' can also be an opposite, but often it means more of a matching part, a corresponding person, or a thing that forms a pair with something else. That is why the words can be confused. If you only mean the contrast, 'Gegensatz' is clearer. If something belongs with something else or corresponds to it, 'Gegenstück' fits better.

Zu dieser linken Schraube fehlt noch das passende Gegenstück.
This left-hand screw is still missing its matching counterpart.
Ben sieht einen starken Gegensatz zwischen dem teuren Hotel und dem einfachen Bahnhof.
Ben sees a strong contrast between the expensive hotel and the simple train station.