Raspberry Pi relay on GPIO does not toggle, but does on +3V power
A GPIO pin cannot provide enough current to a relay directly. Use the GPIO pin to drive a transistor, and use the transistor to drive the relay.