Suppose a simple closed curve $\gamma$ is drawn on a curved surface. The total curvature of the curve $\oint_\gamma \kappa(s)ds$ is larger than $2\pi$ (apparently this is called Fenchel's theorem).
I imagine this quantity could be related, by some kind of Stokes theorem, to an integral over the domain of the surface which has $\gamma$ as its boundary. Is that true?
Namely, let $S$ be such that $\gamma=\partial S$. Does there exist a function $f$ on the surface such that $$ \oint_\gamma \kappa(s)ds=\int_S f(x)dx \text{ ?}$$
No. The Gauss-Bonnet Theorem relates the integral of the geodesic curvature (which is the curvature of the curve as viewed by an inhabitant of the surface) to the integral of Gaussian curvature over the region bounded by the curve.
I interpreted your question to be for a surface sitting in $\Bbb R^3$, say, and for $\kappa$ to represent the curvature of the curve as a curve in $\Bbb R^3$. In that case, there is no relation to anything depending just on the surface.
COMMENT: Fenchel's Theorem actually says the total curvature is at least $2\pi$, with $2\pi$ occurring if and only if the curve is a convex planar curve. (I see your title specified your curve wasn't planar, so this is not literally a correction.)