In this paper presents analytical findings regarding the influence of gravity disturbance on INS. A data from the high-precision gravity model, EGM2008, we introduce a novel real-time gravity disturbance compensation approach for INS. This method estimates gravity disturbances along paths for platforms on both land and water, utilizing the Multi-Layer Perceptron (MLP) technique. To estimate these gravity disturbances, we developed four distinct MLP models and compared their training results using Half-Mean Square Error (half-MSE) and Root Mean Square Error (RMSE). This comparative analysis allowed us to identify the MLP model that exhibited the best performance. In order to validate the proposed gravity compensation method, field test was conducted using a test vehicle. The results of this field test unequivocally demonstrated the effectiveness of our approach in enhancing positioning accuracy. Over the course of a 2-hour field experiment, it was evident that employing the proposed gravity compensation method improved positioning accuracy by a notable 24%.