The Power Supply in the computer is bad. This is no big deal. You can replace it.
This is Gateway Support, and the main page for the Gateway 505GR Desktop PC, http://support.gateway.com/s/PC/R/4054/4054nv.shtml
Left-click on Components.
Scroll down to the heading Power Supplies.
Left-click on - 102015 - 300 watt power supply.
It's just a common ATX style power supply, that is found in over 90 percent of personal computers. Readily available everywhere.
This is an example of an affordable replacement. It is not advertising for said website, nor power supply manufacturer. http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=3255391&CatId=1078
What you need to look for in a replacement power supply for your computer.
2) Correct power cables
3) Correct amount of power cables
4) Correct form factor. (Size of power supply case, and shape of case, in this instance)
2) & 3)
You need the following power cables, and these amounts.
A) (1) 24-pin ATX main power cable
[Main power cable to motherboard]
B) (2) 4-pin Peripheral power cables
[Power for the two optical drives]
C) (1) 4-pin ATX +12 Volt power cable
[Connects to the motherboard.
Power for the Pentium 4 processor]
D) (1) SATA power cable
[Power for the SATA harddrive]
The above power supply in the link has the correct power cables, and more than the correct amount.
Scrolling down the page you will come to the heading - Detailed Features
Here you will see,
A) 20 + 4 pin The two power cables are used together, to equal a 24-pin main power cable
B) 8-pin. Not needed in your case, unless you wish to install a graphics card that uses this power cable.
Just tie this cable up out of the way.
[You do have a PCI-Express x16 slot on the motherboard, which can be used for a PCI-Express graphics card]
C) P4 MB - Stands for Pentium 4 MotherBoard
This is a 4-pin ATX +12 Volt power cable
Comes with two SATA power cables. You only need one for your SATA harddrive. Tie the unused one up out of the way.
Comes with four Peripheral power cables. You only need two for your optical drives. Tie up the unused two.
For a Floppy Drive. Not needed. Tie up out of the way.
Also not needed unless someday you install a graphics card that needs this power cable.
Will add a link, to photos and descriptions of the various power cables listed above, that are needed, in additional comments.
Basic how to replace a computer power supply.http://www.videojug.com/film/how-to-install-or-change-my-computers-power-supply
Your body carries Static electricity. Movements of your body in your clothes, walking across a carpeted floor, are but two ways static electricity is generated.
Static will fry out (Short Circuit) the components inside a computer.
The preferred method is to buy, and wear an ESD wrist strap as shown in the video.
However you can use another method.
Working on a table, computer unplugged from power, computer case open, simply Touch the metal frame of the open computer case.
Should you get up, and walk away when in the middle of working on your computer, remember to to touch the metal frame again upon your return.
Should you have ANY questions regarding replacing your power supply, please state so in a Comment.
Should you wish to test your power supply, also state so in a Comment.
[Will require a multimeter, or a power supply tester]