Detailed studies of stellar and gas dynamics have been carried out primarily in model galaxies which are not good approximations to the shapes of real galaxies (Athanassoula 1991). The high quality of recently available near-IR images of galaxies makes it possible to make realistic mass models of the matter that is traced by starlight. The gravitational potential derived from the mass model of a galaxy can be used to conduct stellar and gas dynamical studies in the galaxy, and the results can be compared to observed velocity fields and other observations of these galaxies. In this report we discuss how accurately the gravitational potential can be estimated based on an infrared image of the galaxy. We describe two uses of such an estimate of a gravitational potential: stellar orbits integrated in the barred galaxy NGC 4314 and an estimate of the gas inflow rate along the bar in NGC 7479.