We present a mathematical model of disease (say a virus) spread that takes into account the hierarchic structure of social clusters in a population. It describes the dependence of epidemic's dynamics on the strength of barriers between clusters. These barriers are established by authorities as preventative measures; partially they are based on existing socio-economic conditions. We applied the theory of random walk on the energy landscapes represented by ultrametric spaces (having tree-like geometry). This is a part of statistical physics with applications to spin glasses and protein dynamics. To move from one social cluster (valley) to another, a virus (its carrier) should cross a social barrier between them. The magnitude of a barrier depends on the number of social hierarchy levels composing this barrier. Infection spreads rather easily inside a social cluster (say a working collective), but jumps to other clusters are constrained by social barriers. The model implies the power law,1-t-a,for approaching herd immunity, where the parameterais proportional to inverse of one-step barrier Delta.We consider linearly increasing barriers (with respect to hierarchy), i.e., them-step barrier Delta m=m Delta.We also introduce a quantity characterizing the process of infection distribution from one level of social hierarchy to the nearest lower levels, spreading entropyE.The parameterais proportional toE.