We propose a method for correcting aberrations in digital holography based on the principles of computational adaptive optics using the phase gradient autofocus technique that demands no reference measurements. The method requires a priori information on the relative positions of the elements of the optical setup. It is applicable for sufficiently smooth optical aberrations. This technique does not impose any restrictions on the magnitude of the scattered optical field phase distortions caused by the object structure. The efficacy of the proposed method is demonstrated through numerical simulation and experimental verification.