The apparent ease with which animals move requires the coordination of their many degrees of freedom to manage and properly utilize environmental interactions. Identifying effective strategies for locomotion has proven challenging, often requiring detailed models that generalize poorly across modes of locomotion, body morphologies, and environments. We present the first biological application of a gauge-theory-based geometric framework for movement, originally proposed by Wilczek and Shapere nearly $40$ years ago, to describe self-deformation-driven movements through dissipative environments. Using granular resistive force theory to model environmental forces and principal components analysis to identify a low-dimensional space of animal postures and dynamics, we show that our approach captures key features of how a variety of animals, from undulatory swimmers and slitherers to sidewinding rattlesnakes, coordinate body movements and leverage environmental interactions to generate locomotion. Our results demonstrate that this geometric approach is a powerful and general framework that enables the discovery of effective control strategies, which could be further augmented by physiologically-relevant parameters and constraints to provide a deeper understanding of locomotion in a wide variety of biological systems and environments.