In this paper, we study a dynamically consistent numerical method for the approximation of a nonlinear integro-differential equation modeling an epidemic with age of infection. The discrete scheme is based on direct quadrature methods with Gregory convolution weights and preserves, with no restrictive conditions on the step-length of integration h, some of the essential properties of the continuous system. In particular, the numerical solution is positive and bounded and, in cases of interest in applications, it is monotone. We prove an order of convergence theorem and show by numerical experiments that the discrete final size tends to its continuous equivalent as h tends to zero.