The Gillespie algorithm, which is a stochastic numerical simulation of continuous-time Markovian processes, has been proposed for simulating epidemic dynamics. In the present study, using the Gillespie-based epidemic model, we focused on each single trajectory by the stochastic simulation to infer the probability of controlling an epidemic by non-pharmaceutical interventions (NPIs). The single trajectory analysis by the stochastic simulation suggested that a few infected people sometimes dissipated spontaneously without spreading of infection. The outbreak probability was affected by basic reproductive number but not by infectious duration and susceptible population size. A comparative analysis suggested that the mean trajectory by the stochastic simulation has equivalent dynamics to a conventional deterministic model in terms of epidemic forecasting. The probability of outbreak containment by NPIs was inferred by trajectories derived from 1000 Monte Carlo simulation trials using model parameters assuming COVID-19 epidemic. The model-based analysis indicated that complete containment of the disease could be achieved by short-duration NPIs if performed early after the import of infected individuals. Under the correctness of the model assumptions, analysis of each trajectory by Gillespie-based stochastic model would provide a unique and valuable output such as the probabilities of outbreak containment by NPIs.