• Thermal model with time-varying delay is developed for a tankless gas water heater. • Feedback, feedforward and model predictive controllers are designed. • Controllers are assessed for cold start and water flow rate sudden disturbances. • Impact of temperature overshoots and undershoots are diminished. • Gain scheduling MPC presents superior performance than classic controllers. One of the most significant drawbacks of tankless gas water heaters is the difficulty of controlling the outlet hot water temperature as changes in water demand cannot be predicted. These sudden changes in hot water flow rate, are associated with the system inhered delays, and are responsible for temperature overshoots and undershoots that severely affect the comfort perception of the user. In the present work, a linear model predictive controller (MPC) design is employed for the stabilization of a constrained nonlinear thermal process with time-varying delay, however, control performance degrades significantly when operating far from the linearization operating point. The idea is to design multiple linear MPC controllers, each with its linear state-space model and constant time delay, describing process dynamics at a specific level of operation. Gain scheduling MPC presents improved performance when compared with classic PID and combined feedforward-feedback controllers, reducing the settling time up to two thirds.