Take $e^{(n)}\in\ell_1$ given by $e^{(n)}_k:=\begin{cases}1&\mbox{ if }n=k;\\\
0&\mbox{otherwise.}
\end{cases}$ Then $d\left(e^{(m)},e^{(n)}\right)=2$ if $m\neq n$ (because in the series giving the $\ell^1$ norm of $e^{(m)},e^{(n)}$,the terms with index $m$ and $n$ are equal to one while all the others are zero), which proves that the unit ball is not sequentially compact for $d$. A set which is not sequentially compact in a metric space cannot be compact.
In fact, the metric $d$ comes from a norm, namely $\left\lVert \left\{x_n\right\}\right\rVert=\sum_{n=1}^{+\infty}\left|x_n\right|$, and the unit ball of an infinite dimensional normed space is never compact for the topology of the norm.
There is, as other have noticed, the $0$-$1$ distance, where $\partial\overline B_{r}(x)=\emptyset$ for all $r$, thus incurring at least in definitory issues. For another example, we can observe that, by Fermat-Wiles, in the metric space $(\Bbb Q^2,d_3)$ with $d_3(x,y)=\sqrt[3]{\lvert x_1-y_1\rvert^3+\lvert x_2-y_2\rvert^3}$ it holds that $\partial\overline B_1(0)=\{(1,0),(0,1),(-1,0),(0,-1)\}$, and therefore, by simple geometric considerations, there are several $x\in B_1(x)$ and $r<d\left(x,\partial \overline B_1(0)\right)$ such that $B_{r}(x)\nsubseteq \overline B_1(0)$.
This can be adapted to a a path-connected counterexample by considering the metric space $X=\{x\in\Bbb R^2\,:\, \lVert x\rVert_3\ne 1\lor x\in\Bbb Q^2\}$ with the distance induced by the ambient space $(\Bbb R^2,\lVert \bullet\rVert_3)$. Then, the same considerations as before on $\overline B_1(0)$ hold, and that specific ball is path-connected. Unfortunately, I cannot think of a complete counterexample, or of a counterexample where all balls are path-connected, and I don't know if they are possible.
Best Answer
Take the set of real numbers, $\Bbb{R}$. Every closed interval in real line is closed and bounded even compact but $\Bbb{R}$ is not compact.