Is it possible to formulate variational calculus geometrically? In textbooks I've seen differential geometry is done with finite-dimensional manifolds. Is it possible to generalise to banach manifolds so as to formulate the calculus of variations within it, or does this naive approach hit problems? And if so where?
 A: The calculus of variations in a non-linear infinite dimensional setting is done by Klingenberg (Riemannian Geometry and Lectures on Closed geodesics) to find closed geodesics on a given (finite-dimensional) Riemannian manifold $M$. For this he constructs a Hilbert manifold $\Lambda M$ of free loops (of class H^1). The critical points of the energy functional corresponds to closed geodesics. These closed geodesics can be shown to be actually smooth. 
The energy functional satisfies some very nice properties. If $M$ is compact, it satisfies the Palais-Smale condition. This basically means that if one sees an almost critical point, it actually is one. (A function which does not satisfy the PS condition is for example the arctangent. If one goes to infinity, the derivative goes to zero, but it is not actually a critcal point). Furthermore the energy functional is bounded from below (by zero obviously). 
These conditions ensure together that on each connected component of the free loop space the  energy functional has a critical point. The components of the free loop spaces are in one to one correspondence with conjugacy classes of the fundamental group. On each of these components one thus finds a closed geodesic. On the component where the contractible loops reside this does not tell you anything new, these critical points are just the constant loops. However on all the other components one can directly find a closed geodesic! Once the machinery of the infinite dimensional manifold and this functional has been set up, you immediately get a very deep result. In each conjugacy class of $\pi_1$ we can find a closed geodesic!
As an aside, one can work a bit harder to also find non-constant closed geodesics in the component of the contractible loops, but this is harder. The statement then becomes that any closed Riemannian manifold contains a closed geodesic.
It is also possible to find periodic solutions of Hamiltonian systems in this manner. Morse theory (in the infinite dimensional setting) helps greatly. 
Edit: Some answers to some questions.
The machinery Klingenberg sets up is Lagrangian. The energy functional
$$E(c)=\int |\dot c(s)|^2 ds$$
can be seen as the Kinetic energy term of a Lagrangian (the potential is constant, and gauged to zero) of a classical mechanical system.
The manifold of closed loops (free loop space) $\Lambda M$ is involved to find closed geodesics. The boundary terms are automatically made to be periodic. It is also possible to find geodesics between two fixed points. One constructs a slightly different Hilbert manifold of paths $\Omega_{pq}M$ between the two points $p$ and $q$. The details are again in Klingenberg.
In principle all closed geodesics can be found using this approach. The critical points of the energy functional on the free loop space, and the parameterized closed geodesics are in 1 to 1 correspondence. However it is hard to actually detect them all, because the set of critical points of $E$ can be complicated. Another problem is that the critical points sometimes detect "different" geodesics that are geometrically indistinguishable. Think about transversing the sphere multiple times. 
If one wants to look for geometrically different geodesics, one needs to quotient out some naturally occuring group actions (of circle reparameterizations basically). I am not sure if the resulting space is in general a manifold, but there is a section on this in Klingenberg, which I have not read yet.
