Electrical control of ferromagnetism in semiconductor nanostructures offers the promise of nonvolatile functionality in future semiconductor spintronics. Here, we demonstrate a dramatic gate-induced change of ferromagnetism in ZnO nanowire (NW) field-effect transistors (FETs). Ferromagnetism in our ZnO NWs arose from oxygen vacancies, which constitute deep levels hosting unpaired electron spins. The magnetic transition temperature of the studied ZnO NWs was estimated to be well above room temperature. The in situ UV confocal photoluminescence (PL) study confirmed oxygen vacancy mediated ferromagnetism in the studied ZnO NW FET devices. Both the estimated carrier concentration and temperature-dependent conductivity reveal the studied ZnO NWs are at the crossover of the metal-insulator transition. In particular, gate-induced modulation of the carrier concentration in the ZnO NW FET significantly alters carrier-mediated exchange interactions, which causes even inversion of magnetoresistance (MR) from negative to positive values. Upon sweeping the gate bias from -40 to +50 V, the MRs estimated at 2 K and 2 T were changed from -11.3% to +4.1%. Detailed analysis on the gate-dependent MR behavior clearly showed enhanced spin splitting energy with increasing carrier concentration. Gate-voltage-dependent PL spectra of an individual NW device confirmed the localization of oxygen vacancy-induced spins, indicating that gate-tunable indirect exchange coupling between localized magnetic moments played an important role in the remarkable change of the MR.