The work continues the author's many-year research in theory of maximal branching processes, which are obtained from classical branching processes by replacing the summation of descendant numbers with taking the maximum. One can say that in each generation, descendants of only one particle survive, namely those of the particle that has the largest number of descendants. Earlier, the author generalized processes with integer values to processes with arbitrary nonnegative values, investigated their properties, and proved limit theorems. Then processes with several types of particles were introduced and studied. In the present paper we introduce the notion of maximal branching processes in random environment (with a single type of particles) and an important case of a "power-law" random environment. In the latter case, properties of maximal branching processes are studied and the ergodic theorem is proved. As applications, we consider gated infinite-server queues.