For real functions it is simply not true that every infinitely differentiable function can be written as a power series. The common counterexample to this is
$$ f(x) = \begin{cases} 0 & x=0 \\ e^{-1/x^2} & x\ne 0 \end{cases} $$
which is infinitely differentiable everywhere (it takes a bit of work to show this at $0$), but all of its derivatives at $0$ are $0$, so its Taylor series is $\sum_n 0\cdot x^n$ which does not converge to $f(x)$ anywhere except at $x=0$.
For complex functions things are much nicer: If a function is even differentiable once everywhere on a disk, it can be written as a power series around the center of that disk. But proving that is much more involved than what you link to.
A real function that can be written as a power series in some neighborhood of every point is called real analytic. There is not really any nice characterization of this other than "has power series everywhere", as long as if we're only looking at real numbers. If we involve complex numbers, the real analytic functions are exactly those functions that can be written as a restriction of a complex function that is differentiable on an open set that includes the real line.