Proof explanation of Stone-Weierstrass theorem

> Theorem:
Let $A \subset C(K)$ such that

1. $A$ is a subalgebra with unity $1$

2. For each $x, y \in K$ with $x \neq y$, there exists $f \in A$ such that $f(x)\neq f(y)$.

Then $\overline A = C(K)$, where $C(K)$ is the space of continuous functions over the compact space $K$.

Proof:
We have to show that for every function $f\in C(K)$, for every $x\in K$ and for every $\epsilon>0$, there exists $g_x \in \overline A$ such that $g_x\le f+\epsilon$ and $g(x)>f(x)$.

My question is: why do we want to show that? Why is the above statement equivalent to the theorem?

Solutions Collecting From Web of "Proof explanation of Stone-Weierstrass theorem"

A subset $A$ of a metric space $M$ is dense if and only if $\overline A=M$.

This imply, because $M$ is a metric space, that for every point $x\in M$ and every $\epsilon>0$ then the open ball $\Bbb B(x,\epsilon)$ contains points of $A$.

Hence there is a sequence on $A$ that converges to $x$, for any $x\in M$.

Now, the metric space of continuous functions $C(\Bbb K)$ is generally defined with the norm $\|{\cdot}\|_\infty$. Then if $A$ is dense in $C(\Bbb K)$ then for every $f\in C(\Bbb K)$ exists a sequence $(f_n)$ in $A$ that converges to $f$, that is, for any $\epsilon>0$ exists a $N\in\Bbb N$ such that

$$\|f_n-f\|_\infty<\epsilon,\quad\forall n\ge N\tag{1}$$

Of course is possible that the sequence $(f_n)$ approach to $f$ from above, that is when $f_n(x)>f(x)$ for all $x\in\Bbb K$. But without more explanation, the statement (and the notation)

$$g_x\le f+\epsilon\tag{2}$$ is not so clear. However if we substitute the space of continuous functions by the space of continuous bounded functions then the reversed triangle inequality

$$\big|\|f_n\|_\infty-\|f\|_\infty\big|\le\|f_n-f\|_\infty$$

is meaningful because $\|f_n\|_\infty$ and $\|f\|_\infty$ are finite. Then if the sequence $(f_n)$ approaches from above to $f$ we can write

$$\|f_n\|_\infty<\epsilon+\|f\|_\infty$$ what is probably what means $(2)$.