Actually, there are a large number of variables that dictate the maximum certificated weight of an airplane.
First, if you are dealing with an experimental homebuilt category airplane, the builder determines the maximum gross weight. This can be based on most anything, though if it's radically outrageous, the FAA probably won't buy it.
Now, if you are talking about a CERTIFIED aircraft, right now the thing that seems to have more influence than anything else on gross weight is NOISE certification. If it's too heavy, it will be closer to the microphones during the climb, and will fail, due to excessive noise. The alternative may be to reduce prop rpm, or install a larger, slower turning motor. Or, restrict the gross weight so that the airplane is higher as it passes the microphones.
Secondly, the load factors described by others apply to the aircraft's primary structure AND to all its installed components, such as a battery box. Acceleration to the load limit cannot fail ANY Components on the airplane.
That said, I think more work goes into beefing up the landing gear assemblies to pass the drop tests than almost anything else.
Finally, there are literally dozens of other criteria that can limit max weight, such as engine cooling capability, climb performance, and so forth.
In other words, there are MANY factors that are involved in setting max weight for a certified aircraft.
MTV