This is the version of the theorem I will use:
Weierstrass theorem: Every continuous function defined over a compact set attains a minimum.
The function $p\mathbin{\cdot} x$ is continuous. The problem is that $X(\bar{u})$ is not compact. So, an additional trick is needed. Since we are working with a subset of $\mathbb{R}^n$ compact means the same as closed and bounded (Heine-Borel theorem). The continuity of $u$ is used to guarantee that $X(\bar{u})$ is closed. But it could be unbounded.
This is where $p\gg 0$ becomes useful. Take an arbitrary point $x_0 \in X(\bar{u})$ and consider the set $Y$ defined by $$Y = \{\,y\in X(\bar{u}) \mid p\cdot y\leq p\cdot x_0\, \}.$$
Since $x_0\in Y$, we know that $Y$ is nonempty. Using the fact that $p\gg 0$, you can show that $Y$ is bounded (I'll let you figure out the details). Since $Y$ is the intersection of two closed sets, it is also closed. Hence, it is compact. Therefore, by Weierstrass theorem, $p\cdot x$ has a minimum in $Y$.
I will also let you figure out the last step on your own, which is to show that the minimum of $p\cdot x$ in $Y$ is also a minimum in $X(\bar{u})$.