An analytic expression is obtained for the threshold acoustic pressure amplitude which causes gas bubbles that are slightly smaller than the critical size to undergo cavitation in a liquid. The derivation is based on the Rayleigh--Plesset equation which describes nonlinear bubble oscillations. In the limit where the steady part of the pressure field in the vicinity of the bubble is decreased to a value less than the vapor pressure inside the bubble, it is well known that there exists a critical bubble radius above which bubbles spontaneously cavitate. For bubbles which are below this critical size and would otherwise be stable, imposition of a time-harmonic acoustic pressure of the right frequency causes the bubbles to become unstable and undergo cavitation. The threshold value of this acoustic pressure is found by employing a nonlinear analysis which reduces the Rayleigh--Plesset equation to a damped and forced Mathieu equation for the case of such slightly subcritical bubbles.