I have learned that a function $f$ on a manifold $S$ (surface in $R^3$ for the sake of this question) is smooth at a point $p$ if the chart containing $p$ composed with $f$ is smooth.
I have also learned that it is sufficient to find a function $g$ from $R^3$ to $R^3$ that is smooth on all points in $S$ and that when restricted to the domain of $S$ equals $f$.
This second definition seems much more intuitive to me and you are able to forgo the whole concept of charts. Are both definitions equivalent? Does a smooth f imply a smooth $g$ exists as stated above? If not what is a counter example in $R^3$?
Thanks
The two are equivalent. So yes, existence of a smooth $f$ implies existence of a smooth $g$, and the other way around. The proofs of these implications rely heavily on the inverse function theorem and its corollaries, including the implicit function theorem.
The reason one would not wish to forgo the whole concept of charts is that although many useful manifolds do arise as submanifolds of Euclidean space, many others do not, instead they arise from constructions out of which atlases of coordinate charts naturally appear. Examples of such manifolds include projective spaces and, more generally, Grassmanian manifolds. So the more universal notion of manifold is stated in terms of atlases of coordinate charts.