Gabite cannot be found in Pokémon Sun and Moon. As a Generation IV Pokémon, it does not appear in the Alola region Pokédex.
To obtain Gabite, you must trade with another player who has transferred it from a compatible game where it is available, such as Pokémon Diamond, Pearl, Platinum, HeartGold, SoulSilver, Black, White, Black 2, or White 2. Alternatively, you can use Pokémon Bank or Pokémon Home to transfer it from those older titles.