Hg2Ba2Y1- xCaxCu2O8-δ contains a double HgO layer with a rock-salt structure. For x=0.3, 0.4, and 0.5 the samples have metallic resistance and become superconductors at low temperatures. The x=0 prototype is an insulator. In order to provide the basic ingredients for the understanding of the normal and superconducting properties, the electronic structure of body-centered tetragonal Hg2Ba2YCu2O8 has been calculated using the full-potential linear augmented plane wave method, within the local approximation to density-functional theory. States close to the Fermi level (EF) are characterized by two antibonding Cu-dx2-y2-O1-p bands (one per Cu-O plane) and the presence of another pair, derived from Hg-d-O2-O3-p. The states of Hg-p character, characteristic of mono Hg layer superconductors, are pushed well above EF. The Hg-d-O-p band is not totally occupied and the resulting hole doping of the Cu-O planes is dimished from that expected from ionic considerations. Our results are compared with the previously obtained electronic structure for the isostructural Bi2Sr2CaCu2O8 and Tl2Ba2CaCu2O8 compounds, to the stoichiometric (δ=0) one-layer parent compounds of the Hg high-Tc superconductor and in particular with the nearly optimally doped HgBa2Ca2Cu3O8+δ, δ=0.5. Finally, the electric-field gradients at each atomic site are reported.