We carried out time-series BV CCD photometric observations of the open cluster NGC 7654 (Messier 52) to search for variable stars. Eighteen slowly pulsating B (SPB) stars have been detected, among which 14 candidates are newly discovered, three known ones are confirmed, and a previously found δ Scuti star is also identified as an SPB candidate. Twelve SPBs are probable cluster members based on membership analysis. This makes NGC 7654 the richest galactic open cluster in terms of SPB star content. It is also a new discovery that NGC 7654 hosts three γ Dor star candidates. We found that all these stars (18 SPB and 3 γ Dor stars) have periods longer than their corresponding fundamental radial mode. With such a big sample of g-mode pulsators in a single cluster, it is clear that multi-mode pulsation is more common in the upper part of the main sequence than in the lower part. All the stars span a narrow strip on the period-luminosity plane, which also includes the γ Dor stars at the low-luminosity extension. This result implies that there may be a single period-luminosity relation applicable to all g-mode main-sequence pulsators. As a by-product, three EA-type eclipsing binaries and an EW-type eclipsing binary are also discovered.