Cardiac gated images often suffer from increased noise in single photon emission computed tomography (SPECT) due to reduced data counts compared to non-gated studies. We investigate a spatiotemporal post-processing approach based on a non-local means (NLM) filter for suppressing the noise in gated SPECT images. In this filter, the output at a voxel location is computed from a weighted average of voxels in its four-dimensional (4D) neighborhood, wherein the filter coefficients are adjusted according to the similarity level in the local image pattern of individual voxels with respect to the output voxel. This adaptive property allows the filter to achieve noise reduction while avoiding excessive blur of the heart wall. In the experiments, we first evaluated the accuracy of the proposed NLM filtering approach using simulated SPECT imaging data. We then demonstrated the approach on eight sets of clinical acquisitions. In addition, we also explored the robustness of the NLM filter with imaging dose reduced by 50% in these clinical acquisitions. The quantitative results show that 4D NLM filtering could effectively reduce the noise level in gated images, leading to more accurate reconstruction of the myocardium. Compared to spatial filtering alone, using temporal filtering in NLM could reduce the mean-squared-error of the myocardium by 55.63% and improve the left ventricle resolution by 19.92%. It could also improve the visibility of perfusion defects in gated images. Similar results are also observed on the clinical acquisitions both at standard dose and at 50% reduced dose. The 4D NLM results are also found to be comparable to that of a motion-compensated 4D reconstruction approach which is computationally more demanding.