There are several ways I think of expressing this 'duality'. But before describing this, maybe it would help to explain a sense in which 'existence' (at least one element, or totality of a relation) is dual to 'uniqueness' (at most one element, or well-definedness of a relation).

So let's consider the category whose objects are sets and whose morphisms are relations $R: A \to B$: let $R(a, b)$ denote the truth value of $(a, b) \in R$, and for relations $R: A \to B$ and $S: B \to C$, define the composite $SR: A \to B$ by the rule $SR(a, c) = \exists_{b: B} R(a, b) \wedge S(b, c)$. The identity relation $1_A: A \to A$ is the diagonal subset of $A \times A$, defined by $1_A(a, b) \Leftrightarrow a = b$.

Technically this "category" is a 2-category, where 2-cells are given by inclusions $R \subseteq S$ between relations of the same type $A \to B$; we will write 2-cells as $R \leq S$. Even more, we have a $\dagger$-operation which takes a relation $R: A \to B$ to its opposite $R^{op}: B \to A$, where $R(a, b) \Leftrightarrow R^{op}(b, a)$. Altogether the structure one obtains is what is known as in categorical literature as an allegory, or as a bicategory of relations: there are various axiomatic frameworks for describing categories of relations.

There are also various notions of 'duality' in such a situation. One is by reversing the direction of 1-cells (called 'op'), another is by reversing the direction of 2-cells (called 'co'), and a third is by reversing directions of both (called 'co-op').

In this 2-categorical context, we may categorically express the condition that a relation $R: A \to B$ is *well-defined* or *functional* (for all $a \in A$ there exists at most one $b \in B$ such that $R(a, b)$ is true) by the condition $R \circ R^{op} \leq 1_B$.

The co-op dual of this condition is $1_A \leq R^{op} \circ R$, which translates to saying that to each $a \in A$ there exists at least one $b \in B$ such that $R(a, b)$, or that $R$ is a *total relation*.

If we have both conditions $R \circ R^{op} \leq 1_B$ and $1_A \leq R^{op} \circ R$, then the relation is a function; in other words, a relation $R$ is a function iff considered as a 1-cell in the 2-category $\mathbf{Rel}$, it has a right adjoint (which is necessarily $R^{op}$; this is a good exercise).

Onto the topology: if $X$ is a topological space and $\beta X$ is the set of ultrafilters on the underlying set of $X$, then there is a convergence relation $\gamma: \beta X \to X$ where $\gamma(U, x)$ (an ultrafilter $U$ converges to $x$) means that the filter of neighborhoods of $x$ is contained in $U$. In fact the very notion of topological space can be expressed in terms of ultrafilter convergence, as explored in the notion of 'relational $\beta$-module' for which you can find an account at the nLab.

A space $X$ is compact iff every ultrafilter on $X$ converges to at least one point. This is the same as saying that the convergence relation $\gamma: \beta X \to X$ is total. A space $X$ is Hausdorff iff every ultrafilter converges to at most one point. This is the same as saying that $\gamma: \beta X \to X$ is well-defined. A space is compact Hausdorff iff its convergence relation $\gamma$ is a function: this is an important ingredient in the theorem that compact Hausdorff spaces are exactly algebras of the ultrafilter monad.

Summarizing:

In the 2-category of sets and relations, the condition of compactness on the convergence relation of a topological space is co-op dual to the condition of Hausdorffness.

There are various other ways in which the duality between compactness and Hausdorffness manifests itself. One is that $X$ is compact if every projection map $X \times Y \to Y$ is closed, whereas $X$ is Hausdorff if the diagonal $X \to X \times X$ is closed (projections and diagonals being the two ingredients of product structures) -- although it would take some time to elaborate a sense in which these properties should be seen as "dual".