We investigate the irreversible growth of (2+1)-dimensional magnetic thin films under the influence of a transverse temperature gradient, which is maintained by thermal baths across a direction perpendicular to the direction of growth. Therefore, different longitudinal layers grow at different temperatures between T1 and T2, where T1 < T chom < T2 and Tchom = 0.69(1) is the critical temperature of films grown in homogeneous thermal baths. We find a far-from-equilibrium continuous order-disorder phase transition driven by the thermal bath gradient. We characterize this gradient-induced critical behavior by means of standard finite-size scaling procedures, which lead to the critical temperature T