Show $A\cap B \neq \varnothing \Rightarrow \operatorname{dist}(A,B) = 0$, and $\operatorname{dist}(A, B) = 0 \not\Rightarrow A\cap B \neq \varnothing$
Let $X=\mathbb{R}$, with the Euclidean metric. Let $A=(-1,0)$ and $B=(0,1)$. Then this is the desired contradiction.
For the second statement to be $\implies$, you need that $A$ and $B$ be compact.
Hint: think $(0,1)$ and $(1,2)$.
Look for sets $A$ and $B$ so that $A \cap B = \emptyset$ but $\overline{A} \cap \overline{B} \ne \emptyset$, where $\overline{E}$ is the closure of a set $E$ in the $d$-metric. This will work if the sets are compact.
Some intuition about why this is what you'd look for: Because you're looking at sequences within the sets $A$ and $B$ approximating the distance between $A$ and $B$, it's natural to think of the closures of $A$ and $B$ instead. So you're looking for two sets whose closures intersect but who don't intersect, which is why you'd look for something missing part of its boundary.
For further Googling: This is the Hausdorff metric.