It could be a hardware problem, such as logic board or power supply. But here are some less serious things to consider.
After doing all that you did already, you probably did a reset PRAM, but if not
Some startup-related setting are stored in PRAM. Also reset SMU (power management)
If the iMac has been connected to power through a "power strip" of some type, especially if it is overcrowded or old, when you connect it to power for the SMU reset, try connecting it directly to a wall outlet by itself. Also, keep all peripherals disconnected initially, except for standard mouse and keyboard, in case something on USB or FireWire is causing interference.
Related to PRAM is the battery. A weak or dead PRAM battery can cause startup issues, and if it has never been changed... The one in an iMac G5 looks like this
For putting a hard drive from a Mac Pro into a iMac G5, one consideration is the partition map scheme (if it was reformatted while in the Intel Mac Pro). A PowerPC Mac needs it to be Apple Partition Map, for it to be bootable. The default for Intel Macs is GUID Partition Table. This setting can be selected in Disk Utility, on the Partition tab (Options button). However, this is more of an FYI because Disk Utility on the Leopard installation disc should have seen the drive, either way. Installer would not have seen it as a possible target, but Disk Utility should have allowed you to reformat (Erase) it again.
Thanks for suggesting some things I didn't think about. I tried resetting PRAM and SMU and connecting the power supply directly. I was aware that the hd I took out of my Mac Pro was formatted GUID but like you said, I figured it would be no problem for Disk Utility to at least see it and then I could reformat it. Still, none of the things I tried let the Leopard install disk see the HD. I guess I could check the RAM by taking out 1 stick at a time but my hunch is the logic board. Is there any software (bootable cd) that would let me check the logic board?
Some third party utilities, such as TechTool Pro, have hardware related tests (beyond the hard drive). However, I think the only tester that will test the logic board specifically for an iMac G5 is the one that came on the original disc. If it is able to startup up from the Leopard installation disc (or the Disk Warrior disc), and run reliably for an extended period, it may not be the logic board causing the problem.
(Doing the RAM check is a good thing to try. However, since it can run from a disc in the optical drive, this may be OK as well)
Have you tried using Disk Utility, while started up from the Leopard disc, to erase (reformat) the original internal drive? When you do this, be sure to select the DRIVE, not the volume indented under the drive, in the Disk Utility sidebar.
See if the machine works in open firmware.
Sometimes if volumes don't appear in Startup Manager (what you get when you hold down the Option key at startup), you need to reset the Mac's PRAM, NVRAM, and Open Firmware. Shut down the Mac, then power it up, and before the screen lights up, quickly hold down the Command, Option, P, and R keys, until the Mac has chimed twice more after the powerup chime. Then, before the screen lights up, hold down Command-Option-O-F until the Open Firmware screen appears. Then enter these lines, pressing Return after each one:
"The reset-all command should restart your Mac. If so, you have successfully reset the Open Firmware settings."
How to eject a cd from the internal cd drive:
List of devices:
List of variables:
( nvram is the equivalent Mac OS X terminal command. )