We present a complete all-electron density functional theory/ab initio study of structural and electronic properties at pure In(111) and Cd-doped In(111) surfaces, enabling a deep analysis of the electric field gradient (EFG) in these systems. We explained, from first-principles, results of previously performed key time-differential perturbed γ -γ angular correlations experiments [W. Körner et al., Phys. Rev. Lett. 49, 1735(1982] on 111 In isotopes (which decay to 111 Cd impurity probe-atoms) deposited onto the In(111) surface of thin films under ultrahigh vacuum, adding inactive indium layer by layer, carefully designed to determine the EFG at different depths from the surface. We confirmed the existence of only two hyperfine interactions, one related with 111 Cd probes localized at the two more superficial In sites (HFI S ), and the other related with probes localized in any of the other inequivalent In sites existing from the surface towards the bulk (HFI B ). In the case of HFI S , V 33 is oriented normal to the (111) surface, and for HFI B we found a V 33 orientation parallel to the [001] axis and coincident with the orientation predicted for both the pure and Cd-doped In bulk (not determined experimentally at present), enabling us to confirm the experimental assignment of HFI B . The axial symmetry that the EFG has in pure and Cd-doped In bulk systems is broken when the surface is generated and is recovered as the probe (In or Cd, respectively) goes deeper from the surface into the bulk. We separated the structural and electronic effects and their sources in the pure and Cd-doped In(111) surface. For the Cd-doped systems we confirm the experimental ratio |V S 33 /V B 33 | ≈ 4, showing that light structural modifications have in important impact on the Cd p-states distribution, which governs the V 33 behavior. Finally, from the combination of the predicted V 33 for the Cd-doped systems as a function of the depth of the Cd localization from the surface with the experimental fractions of HFI S and HFI B , we demonstrated that a single 3-Å active monolayer was enough to explain the origin of these fractions (in discrepancy with the previous interpretation of the experiments), proposing a deposition rate for the inactive In layers, in agreement with the experimental fraction evolution as a function of inactive In deposition.