Charmonium production in heavy-ion collisions is investigated within a kinetic theory framework incorporating in-medium properties of open- and hidden-charm states in line with recent QCD lattice calculations. A continuously decreasing open-charm threshold across the phase boundary of hadronic and quark-gluon matter is found to have important implications for the equilibrium abundance of charmonium states. The survival of J/psi resonance states above the transition temperature enables their recreation also in the quark-gluon plasma. Including effects of chemical and thermal off-equilibrium, we compare our model results to available experimental data at CERN SPS and BNL RHIC energies. In particular, earlier found discrepancies in the psi(')/psi ratio can be resolved.