Controlling many-body states by the electric-field effect in a two-dimensional material