First of all, why to help them at all? Some of the answers might include:
-because you don't like NCR ways
-because you can use PG medic and trader in NCRCF
-because of fun
What ever your reasons are, you need to prepare for fight. You want to keep your involvement in battle to minimum in order to prevent reputation loss with NCR. This means Powder Gangers have to do battle mostly on their own. You can help them by fire if you want but you should be careful not to actually kill anybody or keep kills to minimum.
NCR troops wore medium armor and are armed with relatively rapid firing service rifles. Lightly armed and armored Powder Gangers are no match for them so you need to upgrade their equipment a little bit. If you already cleared Primm of bandits (which I recommend) you should have supply of 9mm pistols and some Varmint riffles at hand. If you helped Goodsprings citizens against Powder Gangers and killed some Powder Gangers in the vicinity (preferably assassinated while sneaking), you should have one or two sets of Powder Ganger Guard armor. You will use those supplies to equip inhabitants of correctional facility.
Equipping NPC can be done the same way stealing is done. Just go to sneak mode, click NPC and "plant" equipment in to his/her inventory. Note however that this makes sense only if equipment which NPC already have is worst than one you are "planting". Otherwise NPC will not use it. Also remember to give them appropriate ammo else they will not be able to fire their new gun. Single bullet is sufficient, it will apparently provide NPC with unlimited supply of ammo. You probably can not do it without loading few times so save often.
You should equip in this way Powder Gangers who do not have ranged weapon and/or armor. 4-5 9mm pistols and 1-2 Varmint riffles (each with single bullet) should be enough to equip all those who have just melee weapons. Equip few with armor according to your supplies. Equip not just those outside but those in various buildings as well. You will need them all. Note also that you will be able to get back part of the equipment after battle. Many of your "clients" are not gone live next day.
To allow NPC to equip those things, just enter one of the buildings and save/load game. Once done, I recommend to steal all melee weapons they have since NPC have nasty tendency to switch to melee and die heroically during fight. Removing their melee weapons will keep them from getting any such ideas.
All this have to be done before revealing to Eddie that NCR is planning attack, since that will trigger attack itself.
Once under attack, wait for all Powder Ganger soldiers to leave administration building -there are 3 of them. All guards will stay with Eddie as well as his buddy an medic. Upon exiting administration, rush to entrance building. Entering it will cause those still inside to join fight outside. Repeat with barracks (trader will not fight).
Once all Powder Gangers joined fight you can go and help them defeat attacking NCR troops and collect booty.
Battle can take random course, sometimes Powder Gangers can defeat NCR troops with ease, other time they might need some help. If you do not want to risk killing NCR troops and loosing reputation as a result, you can help by simply drawing enemy fire upon yourself.
However you should not enter administrative building until attack is over. If attack ends while you are inside administrative building with Eddie, your reputation with NCR will get hit. Game probably assumes that you helped Eddie in such case.
Once attack is over (no NCR troops left) you are free to talk to Eddie who will thank you but otherwise you are not rewarded with reputation it seems.