If you want to use the Kohn-Sham method for a gravitational system, the Hamiltonian will have a simmilar structure.
The Kinetic energy term would be the kinetic energy of the planet.
The Hartree energy term would be a term describing the gravitational potential generated by all other planets.
The external potential term would be the gravitational potential of the sun.
There would also be an exchange-correlation term.