The goal of this paper is to investigate the missing part of the story about the relationship between the orthogonal polynomial ensembles and Painleve equations. Namely, we consider the $q$-Racah polynomial ensemble and show that the one-interval gap probabilities in this case can be expressed through a solution of the discrete $q$-P$left(E_7^{(1)}/A_{1}^{(1)}right)$ equation. Our approach also gives a new Lax pair for this equation. This Lax pair has an interesting additional involutive symmetry structure.