Let me start with a negative result.
Theorem. Let $X$ be a metrizable space with at least two points. Then there is $x\in X$ and a metric $d$ on $X$ such that the closed ball $B_d(x, 1) = \{y\in X : d(x, y) \leq 1 \}$ is disconnected.
Proof: Pick two non-empty open sets $U, V\subseteq X$ such that $\overline{U}\cap \overline{V} = \emptyset$ and some $x\in U\cup V$. There is a metric $d$ on $X$ such that $\{y\in X : d(x, y) < 1\} = U\cup V$, see here. Thus $$U\cup V\subseteq B_d(x, 1) \subseteq\overline{U}\cup\overline{V}$$ so that the closed ball at $x\in X$ is disconnected, as a disjoint union of $B_d(x, 1)\cap\overline{U}$ and $B_d(x, 1)\cap\overline{V}$. $\square$
Now let's see which compact metric spaces admit a metric such that all balls are connected. A compact connected metrizable space is called a continuum. If a continuum is locally connected (or equivalently, locally path-connected), it's called a Peano continuum.
Theorem. Let $X$ be a compact metrizable space. Then $X$ admits a metric with all closed balls connected iff $X$ is a Peano continuum.
Proof: If $X$ is compact and metrizable, let $x\in X$ and $d$ a metric on $X$ with all closed balls connected. Then $\bigcup_{n\in\mathbb{N}} B_d(x, n) = X$ where $B_d(x, n)$ is the closed ball of $X$ of radius $n$ in the metric $d$, so that $X$ is connected as a union of connected sets with common point $x$. Thus $X$ is a continuum. Moreover, for any $y\in X$, the closed balls $B(y, r)$, $r > 0$, form a neighbourhood system at $y$ consisting of connected sets. Thus $X$ is connected im kleinen, or weakly locally connected, at every point of $X$. This is known to be equivalent to $X$ being locally connected. See for example this entry on wikipedia for a proof. Thus $X$ is a Peano continuum.
Conversely, assume that $X$ is a Peano continuum. By this great answer by Moishe Kohan, all locally compact separable connected locally connected metrizable spaces admit a complete geodesic metric $d$, thus making all balls $B_d(x, r)$ path-connected, in fact both open and closed balls. In particular, all Peano continua admit such a metric (note that all compact metric spaces are separable). $\square$