The ability to actively control heat flows in the nanoscale can open up a plethora of opportunities for applications that require thermal management and regulation. We show that it is possible to build a three-terminal quantum thermal gating device which regulates the thermal conductivity between two of its terminals in response to light incident upon the remaining terminal. We model our device as three mutually coupled two-level systems which interact thermally and optically with their environment. To incorporate the thermal interactions of our device, we adopt an open quantum systems framework under the Born-Markov approximation. We subsequently use detailed quantum mechanical state analysis to illustrate its operating principle. Through numerical simulations, we further explore the nonlinear relationship between the optical field amplitude and the thermal conductivity of the device in the steady-state regime. Based on our investigations, we find that the energy-gating behavior of our device is highly efficient in that it can control a significantly larger thermal energy flow compared to the amount of energy it absorbs from the optical field in the process. The approach we have taken to analyze the system, in particular the graphical representations we developed to intuitively and concisely represent the quantum states, energy flows, and the relationships between them, could be of value in analyzing other similar thermo-optical systems. Thus, we envision that both the device concept and its analysis technique would be useful to researchers working in this area.