The equilibrium structures and electronic structure of LaNi5-xGax (x=0, 0.5, 1.0) compounds have been investigated by all-electron calculations. Based on the full geometry optimization, the densities of states and electron densities of LaNi5-xGax are plotted and analyzed. It is clear that the substitution of Ga at the Ni site leads to a progressive filling of the Ni-d bands, the ionic interaction between Ni and Ni, with Ga plays a dominant role in the stability of LaNi5-xGax compounds. The smaller the shift of E_F toward higher energy region, the more stable the compounds will be. The increased contribution of the Ni-d-Ga-d interactions near E_F and the low energy metal-gallium bonding bands indicate that the compounds become more stable. The results are compared with experimental data and discussed in light of previous studies.