In GNSS-denied environments, aiding a vehicle's inertial navigation system (INS) is crucial to reducing the accumulated navigation drift caused by sensor errors (e.g. bias and noise). One potential solution is to use measurements of gravity as an aiding source. The measurements are matched to a geo-referenced map of Earth's gravity in order to estimate the vehicle's position. In this paper, we propose a novel formulation of the map matching problem using a hidden Markov model (HMM). Specifically, we treat the spatial cells of the map as the hidden states of the HMM and present a Viterbi style algorithm to estimate the most likely sequence of states, i.e. most likely sequence of vehicle positions, that results in the sequence of observed gravity measurements. Using a realistic gravity map, we demonstrate the accuracy of our Viterbi map matching algorithm in a navigation scenario and illustrate its robustness compared to existing methods.