Suppose $(X, d)$ is a given metric space. Denote by $d_H$ the Hausdorff metric and by $\alpha(\cdot)$ - the Hausdorff measure of non-compactness.
1) If $(X,d)$ has Heine-Borel property (that is, every closed and bounded subset of $X$ is compact), then if $A\subset X$ such that there exists $Y\subset X$ compact with $d_H(A, Y) < \infty$, then $\alpha(A) = 0$. Indeed, to see this, observe that since $Y$ is compact, it is totally bounded. Since $d_H(A, Y) < \infty$, $A$ is totally bounded, hence the closure of $A$ is totally bounded. Then the closure of $A$, $\overline{A}$, is compact, but $\alpha(\overline{A}) = \alpha(A)$.
2) In general, if $(X, d)$ does not have Heine-Borel property and $A\subset X$ such that there exists $Y\subset X$ compact with $d_H(Y, A) < \infty$, then $\alpha(A) < \infty$ (indeed, this follows since the above conditions imply that $A$ is totally bounded), but it may happen that $\alpha(A) > 0$. Indeed, consider $\ell^2(\mathbb{Z})$, and $A$ - the set of all elements in $\ell^2(\mathbb{Z})$ of norm one. Then $2\geq \alpha(A) > 1$. On the other hand, $\{0\}\subset\ell^2(\mathbb{Z})$ is compact and $d_H(\{0\}, A) = 1$.
In general, if $d_H(A, Y) \leq \delta$, then $\alpha(A) \leq 2\delta$. Indeed, suppose $d_H(Y, A) \leq \delta$ yet $\alpha(A) > 2\delta$. Then $A$ contains infinitely many points, say $a_1, a_2,\dots$ such that for any $i\neq j\in \mathbb{N}$, $d(a_i, a_j) > 2\delta$. But then $Y$ must contain infinitely many points $b_1, b_2,\dots$ such that for $i\in\mathbb{N}$, $d(a_i, b_i) < \delta$, and hence for any $i\neq j\in\mathbb{N}$, $d(b_i, b_i) > \delta$. This contradicts compactness of $Y$.
Finally, if $d_H(A, Y) = \delta$, $\delta > 0$, it may still happen that $\alpha(A) < 2\delta$, or in fact $\alpha(A) = 0$. Indeed, pick any compact $Y$ and adjoin to it $\{a\}$, with $a\notin Y$. That is, let $A = Y\cup \{a\}$.
3) If $A\subset X$ and $Y\subset X$ compact, $d_H(A, Y) = \infty$, then $\alpha(A) = \infty$ (this is obvious).