There are two hots and two grounds in the fuel pump circuit. One hot energizes the coil inside the relay, which closes the switch for the other hot, and grounds through the ECU (the ECU opens/closes this ground as appropriate). The other hot passes through aforementioned switch which is closed when the coil next to it is energized. This hot energizes the fuel pump and grounds there (I'm guessing to the frame somewhere).
Now, there aren't supposed to be any wires sticking out of any of the relays. If I were to wager a guess, I'd say a fault developed in the ECU ground which will prevent the relay from closing and therefore prevent the fuel pump from running. Someone figured that they could "fix" the circuit by creating a new ground and jammed that wire in there. The problem is doing this will result in the fuel pump circuit always being hot, which is absolutely not supposed to happen (will certainly result in premature failure of the fuel pump not to mention the constant pressure on inactive fuel injectors definitely won't do them any favors). The reason why I think the fault is in this ground and not the fuel pump ground is because of your CEL referencing the relay. When the ECU closes the ground for the relay, it is expecting to receive power from it. Because it is not receiving power, it perceives the ground as being open and is setting the code. If the fuel pump ground were the issue and the relay was switching properly, the ECU would receive power from the relay and not think anything is wrong, despite the fact that the engine won't run.
I've always said it, computers are smart but they're not that smart.
I would personally pull the relay and the wire and swap in a different one from somewhere in the box. If you have a spare, use that. Otherwise, use one for the A/C or the headlights or anything that won't prevent the engine from running. If the engine starts and runs just fine afterwards, you've found your problem and, if you don't have a spare relay, will need to buy a new one.
In regards to your shifting problem, I'll say a thing or two but my knowledge involving trannies isn't great. To me, it sounds like you have a pressure issue within the tranny. Try checking the fluid level/color. The tranny needs to be warm (go for a drive) and in neutral before you pull the dipstick. If you're under the full mark, add some fluid (ATF+4 ONLY!) until you're full. If it's anything other than pink/dark red, the fluid is excessively dirty and should be changed ASAP. Be warned, if the fluid is any shade of brown, then it's burnt, meaning damage to the internals and changing it now may result in the transmission not functioning at all due to contaminates now thickening the fluid and allowing pressure to be generated that way (an engine with excessive bearing wear may still develop oil pressure in the same way). If your fluid level/condition are fine, you're looking at something else. I'll let others who know more about transmissions chime in here.