In the event that anyone ever needs to do this I found a solution. I just echo'd the $myPass variable and piped it to GPG. For GPG to pick it up I had to use the --passphrase-fd 0 option. This basically just tells GPG to pick up the passphrase from file descriptor 0.
Code:
echo $myPass | gpg --passphrase-fd 0 -d filename.gpg
You can then go a step further and define a file for the output to be sent to, but the solution is there.