Assume that $\gamma\colon\Sigma\to M$ is a map from a surface to an $n$-manifold, both equipped with Riemannian metrics and theire Levi-Civita connections. Then there exists a connection $\nabla^\gamma$ along $\gamma$ induced by $\nabla^M$. Let me rewrite your equation as $\nabla^\gamma_X(d\gamma\circ Y)=d\gamma(\nabla^\Sigma_XY)$.
Assume that $\gamma$ satisfies this equation, let $c\colon I\to\Sigma$ be a geodesic, and let $X$ extend the vector field $\dot c$. Then $\nabla^\Sigma_XX$ vanishes along $c$, so the right hand side vanishes along $c$. The left hand side along $c$ can be read as the geodesic equation for $\gamma\circ c$. Hence $\gamma$ maps geodesics to geodesics if our equation holds.
So $\gamma$ is a projective embedding with totally geodesic image ("projective" means "maps geodesics to geodesics". Here, we also map constant speed parametrisations to constant speed parametrisations, which is close to being isometric up to scaling). As totally geodesic submanifolds do not exist in generic Riemannian manifolds $(M,g)$, you are in very special situation if your equation holds.