The Surface Water and Ocean Topography (SWOT) altimeter mission can measure high-resolution wide-swath sea surface heights (SSHs) that may greatly improve the current accuracy and spatial resolution of marine gravity from nadir-looking altimeters. To investigate the potential of SWOT in recovering high-quality marine gravity and how SWOT observation errors should be treated to optimize the accuracy of gravity anomaly from SWOT observations, we create high-wavenumber SSH components from multi-beam depths in the northern South China Sea (SCS) and simulate SWOT SSH errors. To cross-validate gravity signals and avoid gravity errors from SWOT, we use two computational methods (inverse Vening-Meinesz formula, IVM and inverse Stokes' integral, ISM) and recommend separate optimal data processing strategies when using geoid gradients (GGs) and geoid heights (GHs) for gravity recovery. The use of GGs (for IVM) effectively eliminates systematic errors in gravity derivation. If GHs (for ISM) are used in gravity recovery, the tilt in wide-swath SSHs should be removed before gravity computation, and the recovered gravity must be filtered (post-processed) to avoid artificial gravity signals due to the SSH errors. Our assessments using mgal-accuracy shipborne gravity anomalies in the northern SCS show that multiple-cycle SWOT observations can deliver high-quality marine gravity anomalies. IVM is more robust than ISM in resisting random and systematic errors in SWOT. Our processing strategies can be used for the gravity validation of SSHs from SWOT's fast-sampling and science phases.