A loop is a rather general algebraic structure that has an identity element and division, but is not necessarily associative. Smooth loops are a direct generalization of Lie groups. A key example of a non-Lie smooth loop is the loop of unit octonions. In this paper, we study properties of smooth loops and their associated tangent algebras, including a loop analog of the Maurer-Cartan equation. Then, given a manifold, we introduce a loop bundle as an associated bundle to a particular principal bundle. Given a connection on the principal bundle, we define the torsion of a loop bundle structure and show how it relates to the curvature, and also develop aspects of a non-associative gauge theory. Throughout, we see how some of the known properties of G2-structures can be seen from this more general setting.