So, I run a couple of grinders up at my off-grid cabin, where I'm moving to full-time soon. I'm staying off-grid. Some of my larger equipment will be run off generators until I can produce enough of my own renewable electricity and have a large enough battery bank. (Plan is to have 200+ kWH of lithium ultimately, and I've got 3 industrial inverters that can produce 230V 3ph service when slaved together). All this to say, I know a little bit about running stuff on non-standard electrical sources.
Here's the issue with running off a small generator: Most of them have GFCI receptacles on them now. Plus, you still need to ground the frames, they're usually neutral bonded to the frame itself here in the US.
The exception to this rule, often are any generators that offer 220V output. In my case, I run most of my smaller shop equipment at the moment, including the belt grinders, a 220V inverter 200a Mig welder, a small plasma cutter, etc, off a Champion 6500w peak (5000w continuous) open frame inverter generator, this has a 220V turn-lock style 4-wire circuit and receptacle that isn't GFCI, but does have a breaker, although it also has 120V standard recepts, which are both GFCI as well.
Now as others have mentioned, noise is gonna be a problem for you if you buy anything less than a closed frame inverter gen. You could get one, a 2000w champion/honda/yamaha/etc and replace the gfci, but make sure you ground the generator properly if you're going to do that, and know that it'll void your warranty. As far as that goes, Champion has been exceptionally good at warranty stuff from everyone I know that owns them. You also can't run the generator in a closed garage, they pump out massive amounts of Co2 and you'll die, it'll have to be outside and I'm guessing your neighbors aren't gonna be happy with you.
If you try to run off a "battery generator" be aware that many of them have inverters that can't handle big the current spikes of the VFDs with induction motors, and you'll need a very expensive and large unit to run the grinder any period of time. However, you may be able to actually utilize one that allows charging and discharging at the same time, have it plugged into that GFCI recept you've got to charge it, and it'll handle the discharge, so your net power loss would only be the difference in the battery charge rate, vs the discharge to your grinder.
Bear in mind you're looking at something in the order of 1,500watts give or take, for the motor at full speed plus overhead for VFD, inverter, etc. That means you need roughly 1.5kWh of storage for every hour of run time. At 12v nominal (as many batteries are configured), thats 125 Amp hour capacity, bare minimum, per hour, and that's assuming 100% DoD for the cells, which is usually detrimental, even to lithium chemistries, with lead acid, any discharge below 50% damages the batteries permanently depleting capacity and cycle life. With most lithium chemistries, you want to be no higher than the 90% DoD range to maintain cycle life, which means you really need more than 125Ah per hour. Lithium battery capacities in retail/commercial products currently run around $800 per 100Ah, which equates to about $666 per kilowatt hour of storage (kWH) I'm sure you can see the point I'm trying to demonstrate here, you'd come out miles ahead finding a house to rent instead, or talk to your landlord and ask them about a dedicated circuit.
On the other hand, if you're really electrically inclined and capable, you can build lithium battery packs from surplus and salvage sources, in the neighborhood of $100 per kWh of storage.
You could also try adjusting the CL trim pot in the VFD (current limit) down. You're tripping the breaker in the other garage because you don't have a dedicated circuit, and don't have enough actual current available with whatever else is running on it. It'll limit your torque ultimately, making your grinder easier to stall, but it may work well enough to get by.