This short note is a review of the intriguing connection between the quantum Gaudin model and the classical KP hierarchy recently established in [1]. We construct the generating function of integrals of motion for the quantum Gaudin model with twisted boundary conditions (the master T-operator) and show that it satisfies the bilinear identity and Hirota equations for the classical KP hierarchy. This implies that zeros of eigenvalues of the master T-operator in the spectral parameter have the same dynamics as the Calogero-Moser system of particles.