Trust in science and experts is extremely important in times of epidemics to ensure compliance with public health measures. Yet little is known about how this trust evolves while an epidemic is underway. In this paper, we examine the dynamics of trust in science and experts in real-time as the high-impact epidemic of Coronavirus (COVID-19) unfolds in Italy, by drawing on digital trace data from Twitter and survey data collected online via Telegram and Facebook. Both Twitter and Telegram data point to initial increases in reliance on and information-seeking from scientists and health authorities with the diffusion of the disease. Consistent with these increases, using a separately fielded online survey we find that knowledge about health information linked to COVID-19 and support for containment measures was fairly widespread. Trust in science, relative to trust in institutions (e.g. local or national government), emerges as a consistent predictor of both knowledge and containment outcomes. However, over time and as the epidemic peaks, we detect a slowdown and turnaround in reliance and information-seeking from scientists and health authorities, which we interpret as signs of an erosion in trust. This is supported by a novel survey experiment, which finds that those holding incorrect beliefs about COVID-19 give no or lower importance to information about the virus when the source of such information is known to be scientific.