We analyze the externalities that arise when social and economic interactions transmit infectious diseases such as COVID-19. Individually rational agents do not internalize that they impose infection externalities upon others when the disease is transmitted. In an SIR model calibrated to capture the main features of COVID-19 in the US economy, we show that private agents perceive the cost an additional infection to be around $80k whereas the social cost including infection externalities is more than three times higher, around $286k. This misvaluation has stark implications for how society ultimately overcomes the disease: for a population of individually rational agents, the precautionary behavior by the susceptible flattens the curve of infections, but the disease is not overcome until herd immunity is acquired. The resulting economic cost is high; an initial sharp decline in aggregate output followed by a slow recovery over several years. By contrast, the socially optimal approach in our model focuses public policy measures on the infected in order to contain the disease and quickly eradicate it, which produces a much milder recession. If targeting the infected is impossible, the optimal policy in our model is still to aggressively contain and eliminate the disease, and the social cost of an extra infection rises to $586k.