This (for real-valued rather than complex-valued functions) was essentially in Stone's original paper that proved the Stone-Weierstrass theorem, as Theorem 84. The statement is a bit funny, since he defines the equivalence relation $x\sim y$ not in the obvious way but as "$x$ is in the intersection of all sets $f^{-1}(U)$ such that $f\in\mathcal{A}$, $U\subset\mathbb{R}$ is an open interval, and $y\in f^{-1}(U)$" (this definition appears in the statement of Theorem 81). Rather than stating that $\mathcal{A}$ is the collection of continuous functions that are constant on the equivalence classes of $\sim$, Stone states that $\mathcal{A}$ is isomorphic to the ring of continuous functions on the quotient space $X/{\sim}$ via the canonical map, but it is trivial to see these formulations are equivalent.