I like the double arrow space, as a classical example:
Let $X = [0,1] \times \{0, 1\}$, where $X$ has the lexicographical ordering $(x,i) < (y,j)$ iff $x < y$ or ( $x = y$ and $i=0, j=1$). Then $X$ in the order topology is separable ($\mathbb{Q} \times \{0, 1\}$ is countable and dense), compact, hereditarily normal and perfectly normal and first countable, but its square is not hereditarily normal (it contains the square of the Sorgenfrey line, which can be seen as the subspace $(0,1) \times \{1\}$ ).
So even very nice compact spaces need not be metrizable.
Proofs can be found here, e.g.
The lexicographically ordered unit square, also discussed in the previous link, is another example, which is less nice (not separable), but for which it is easier to disprove metrizability, as it's compact and not separable.
Another classical example from the same Aleksandrov paper IIRC, is the double of $[0,1]$, which is also $X = [0,1] \times \{0,1\}$, and where a basic neighbourhood of $(x,1)$ is just $\{(x,1)\}$ (these are isolated points), but a basic neighbourhood of $(x,0)$ is of the form $O = (I \times \{0,1\}) \setminus \{(x,1)\}$
where $I$ is any standard open set of $[0,1]$ containing $x$. This is compact as $[0,1]$ is, but has an uncountable discrete open subspace $[0,1] \times \{1\}$, making it not separable and not second countable, so not metrisable.
This can't happen for compact Hausdorff spaces. If $X$ is compact Hausdorff, then the components of $X$ are the same as the quasicomponents of $X$. In other words, any two distinct components are separated by clopen sets of $X$. Since a clopen set is a union of components (as is its complement), its image in $X/{\sim}$ is also clopen, and so $X/{\sim}$ is not just Hausdorff but totally separated (any two points are separated by clopen sets).
Without compactness, though, this can fail even for otherwise very nice spaces. For instance, let $X=\{1,1/2,1/3,\dots\}\times[0,1]\cup\{0\}\times\{0,1\}\subset\mathbb{R}^2$. Then $\{(0,0)\}$ and $\{(0,1)\}$ are both components of $X$, but any neighborhood of either intersects all but finitely many of the components $\{1/n\}\times[0,1]$ and so they do not have disjoint neighborhoods in $X/{\sim}$.
Best Answer
Mapping spaces with the compact-open topology are virtually never compact. In particular, for instance, suppose that there is a closed subspace $Z$ of $Y$ homeomorphic to $[0,1]$ and $X$ is normal and contains an infinite compact subset $K$. (In particular, for instance, this holds whenever $X$ and $Y$ are nonempty positive-dimensional manifolds.) Then $C(X,Z)$ is a closed subspace of $C(X,Y)$ and the restriction map $C(X,Z)\to C(K,Z)$ is surjective by the Tietze extension theorem. So, if $C(X,Y)$ were compact, then $C(K,Z)$ would also be compact. But $C(K,Z)\cong C(K,[0,1])$ is then just a subspace of the Banach space $C(K)$ of continuous real-valued functions on $K$ with the sup norm, and $C(K,[0,1])$ can in fact be described as the closed ball of radius $1/2$ centered at the constant function $1/2$ in $C(K)$. Since $K$ is infinite, $C(K)$ is infinite-dimensional, so closed balls in $C(K)$ are not compact. Thus $C(K,[0,1])$ is not compact and neither is $C(X,Z)$ or $C(X,Y)$. (Note in particular that $C(X,Z)$ is connected so this also shows that the connected component of $C(X,Y)$ containing $C(X,Z)$ is not compact.)
Some trivial cases where $C(X,Y)$ is compact are if $X$ is empty or if $Y$ is compact and $X$ is discrete (so the compact-open topology is just the product topology on $Y^X$) or if $Y$ is compact and every continuous map $X\to Y$ is constant (so $C(X,Y)\cong Y$). Note that if $X$ is nonempty, then $C(X,Y)$ continuously surjects to $Y$ by evaluating at any point of $X$, so $C(X,Y)$ cannot be compact unless $Y$ is compact.