Gauss-Bonnet Like Statement Connecting Parallel Transport and Curvature Let $M$ be a $2$-dimensional orientable Riemannian manifold and $p$ be a point in $M$.
Let $(U, \varphi)$ be a coordinate chart about $p$ such that $\text{Im}(\varphi)$ is a ball in $\mathbf R^2$.
Let $\gamma$ be a piecewise smooth simple loop based at a point $p$ in $M$ such that $\text{Im}(\gamma)$ is contained in $U$.

I want to show that $\int_\Omega K\ dA \equiv \text{rot}_\gamma \pmod{2\pi}$

Here $K$ denotes the sectional curvature, $\Omega$ is the interior of $\gamma$, $dA$ is the Riemannian volume form, and $\text{rot}_\gamma$ is the rotation of $T_pM$ caused by parallel transport around the loop $\gamma$.
The statement above is clearly true if $\gamma$ formed a geodesic triangles, for we can just apply the Gauss-Bonnet formula which states that the angle defect of the triangle is same as the integral $\int_\Omega K\ dA$. Similarly, one can prove this result if $\gamma$ was a geodesic polygon. From there perhaps one could try to argue by approximating an arbitrary $\gamma$ by geodesic polygons. But that seems inelegant to me. 
 A: You can prove your result in the same way one proves the (local) Gauss-Bonnet theorem. Assume for simplicity that $\gamma$ is smooth and parametrized by unit length. Performing Gram-Schmidt on the local oriented coordinate frame associated with the chart $\varphi$, you can get a local oriented orthonormal frame $E_1, E_2$ defined on $U$. Now write
$$ P_{\gamma, 0, t}(\dot{\gamma(0)}) = a(t) \cdot E_1(\gamma(t)) + b(t) \cdot E_2(\gamma(t)) := E(t) $$
where $P_{\gamma,0,t}$ is the parallel transport along $\gamma$ from $T_{\gamma(0}M$ to $T_{\gamma(t)} M$. Since the parallel transport is an isometry, we must have $a(t)^2 + b(t)^2 \equiv 1$ and hence we can find a smooth function $\theta \colon [0,1] \rightarrow \mathbb{R}$ such that $(a(t),b(t)) = (\cos \theta(t), \sin \theta(t))$ so
$$ P_{\gamma,0,t}(\dot{\gamma}(0)) = \cos \theta(t) \cdot E_1(\gamma(t)) + \sin \theta(t) \cdot E_2(\gamma(t)). $$
The parallel transport map $P_{\gamma,0,1}$ acts on $\dot{\gamma}(0)$ (and hence on any other vector) by rotating it by $\theta(1) - \theta(0)$ counterclockwise (with respect to the orientation determined by the frame $E_1,E_2$) and so what you want to show is that
$$ \theta(1) - \theta(0) = \int_0^1 \dot{\theta}(t) \, dt = \int_{\Omega} K \, dA. $$
Now proceed as in the proof of the Gauss-Bonnet theorem. Define a one-form $\omega$ on $U$ by
$$\omega(X) = \left< E_1, \nabla_X E_2 \right> = -\left< \nabla_X E_1, E_2 \right>. $$
A direct caculation shows that $d\omega = K \, dA$ while
$$ 0 = \frac{DE}{dt} = -(\dot{\theta} \sin \theta) \cdot E_1 + \cos \theta \cdot \nabla_{\dot{\gamma}} (E_1) + (\dot{\theta} \cos \theta) \cdot E_2 + \sin \theta \cdot \nabla_{\dot{\gamma}} (E_2) = \\
(\omega(\dot{\gamma}) - \dot{\theta})( \sin \theta \cdot \, E_1 -\cos \theta \cdot E_2) $$
where we used in the calculation that $\left< E_1, \nabla_X E_1 \right> = \left< E_2, \nabla_X E_2 \right> = 0$ (a consequence of $\| E_1 \| = \| E_2 \| \equiv 1$).
Hence, we get $\omega(\dot{\gamma}(t)) - \dot{\theta}(t) \equiv 0$ and the result follows from Stokes' theorem:
$$ \theta(1) - \theta(0) = \int_0^1 \dot{\theta}(t) \, dt = \int_0^1 \omega(\dot{\gamma}(t))\, dt = \int_{\gamma} \omega = \int_{\Omega} d\omega = \int_{\Omega} K \, dA. $$
