ATPase component of the type IV pilus (T4P) (By similarity). Acts as a molecular motor to provide the energy that is required for biogenesis of the pilus and the extrusion of substrates generated in the cytoplasm (By similarity). PilB is required for optimal T4P extension and, consequently, efficient natural transformation. May promote processive T4P extension (PubMed:34145281). Inhibited by the inhibitory protein CpiA. Interacts with CpiA. Disruption of the gene reduces transformation rates by two orders of magnitude. Natural transformation is undetectable in the pilB-tfpB double mutant. The pilB-tfpB-pilT triple mutant produces no detectable T4P fibers. Both PilB and TfpB are essential for optimal T4P production, with each motor playing a distinct role in T4P extension. Overexpression of pilB does not restore the transformation defect of a tfpB mutant. Belongs to the GSP E family.