This paper presents a solution procedure to investigate the periodic response of a Duffing oscillator under combined harmonic and random excitations. The solution procedure consists of an implicit harmonic balance method and a Gaussian closure method. The implicit harmonic balance method, previously developed for the case of harmonic excitation, is extended to the present case of combined harmonic and random excitations with the help of the Gaussian closure method. The amplitudes of the periodic response and the steady variances can be automatically found by the proposed solution procedure. First, the response process is separated into the mean part and the random process part. Then the Gaussian closure method is adopted to reformulate the original equation into two coupled differential equations. One is a deterministic equation about the mean part and the other is a stochastic equivalent linear equation. In terms of these two coupled equations, the implicit harmonic balance method is used to obtain a set of nonlinear algebraic equations relating to amplitudes, frequency, and variance. The resulting equations are not explicitly determined and they can be implicitly solved by nonlinear equation routines available in most mathematical libraries. Three illustrative examples are further investigated to show the effectiveness of the proposed solution procedure. Furthermore, the proposed solution procedure is particularly convenient for programming and it can be extended to obtain the periodic solutions of the response of multi degrees-of-freedom systems.