Gaia and the dynamics of the Galaxy