  We calculate superconducting gaps and quasiparticle density of states of
YNi$_2$B$_2$C in the framework of the density functional theory for
superconductors to investigate the origin of a highly anisotropic
superconducting gaps in this material. Calculated phonon frequencies, the
quasiparticle density of states, and the transition temperature show good
agreement with experimental results. From our calculation of superconducting
gaps and orbital character analysis, we establish that the orbital character
variation of the Fermi surface is the key factor of the anisotropic gap. Since
the electronic states that consist of mainly Ni $3 d$ orbitals couple weakly
with phonons, the superconducting gap function is suppressed for the
corresponding states, which results in the anisotropy observed in the
experiments. These results are hints to increase the transition temperature of
materials in the borocarbide family.
