To tweak this, go to Gboard Settings > Preferences and change the Touch and hold duration. It's set to 300ms by default, but ...
To keep Gboard from stopping unexpectedly, make sure that it's set as the default keyboard, is fully updated, and has a clear cache.