We derive a generalized heat conduction problem for a rarefied gas at slip regime from a gradient system where the driving functional is the entropy. Specifically, we construct an Onsager system (X,S,Kheat) such that the associated evolution of the system is given by ∂tu=+Kheat(u)DS(u), where the Onsager operator, Kheat(u), contains higher-gradients of the absolute temperature u. Moreover, through Legendre-Fenchel theory we write the Onsager system as a classical gradient system (X,S,G) with an induced gradient flow equation, ∂tu=∇GDS(u). We demonstrate the usefulness of the approach by modeling scale-size thermal effects in periodic media that have been recently observed experimentally.