Thermodynamics governing the synthesis of DNA and RNA strands under a template is considered analytically and applied to the population dynamics of competing replicators. We find a nonequilibrium phase transition for high values of polymerase fidelity in a single replicator, where the two phases correspond to stationary states with higher elongation velocity and lower error rate than the other. At the critical point, the susceptibility linking velocity to thermodynamic force diverges. The overall behavior closely resembles the liquid-vapor phase transition in equilibrium. For a population of self-replicating macromolecules, Eigen's error catastrophe transition precedes this thermodynamic phase transition during starvation. For a given thermodynamic force, the fitness of replicators increases with increasing polymerase fidelity above a threshold.