We present the theoretical analysis and computer simulation of the wakefields in a 17 GHz photonic band-gap (PBG) structure for accelerator applications. Using the commercial code CST Particle Studio, the fundamental accelerating mode and dipole modes are excited by passing an 18 MeV electron beam through a seven-cell traveling-wave PBG structure. The characteristics of the longitudinal and transverse wakefields, wake potential spectrum, dipole mode distribution, and their quality factors are calculated and analyzed theoretically. Unlike in conventional disk-loaded waveguide (DLW) structures, three dipole modes (TM[subscript 11]-like, TM[subscript 12]-like, and TM[subscript 13]-like) are excited in the PBG structure with comparable initial amplitudes. These modes are separated by less than 4 GHz in frequency and are damped quickly due to low radiative Q factors. Simulations verify that a PBG structure provides wakefield damping relative to a DLW structure. Simulations were done with both single-bunch excitation to determine the frequency spectrum of the wakefields and multibunch excitation to compare to wakefield measurements taken at MIT using a 17 GHz bunch train. These simulation results will guide the design of next-generation high-gradient accelerator PBG structures.United States. Dept. of Energy. High Energy Physics Division (Contract DEFG02- 91ER40648)China. Fundamental Research Funds for the Central Universities (Contract ZYGX 2010J055