36 weeks pregnant and have severe upper back pain that won't go away, is this more likely my gallstones or pregnancy. It's only in the back.?

Many possible causes. I am not sure what side your upper back pain is located, however back pain in the presence of 36 weeks gestation could be related to :prelabor type pains, muscle -related due to the weight gain in the low abdomen, kidney stones or kidney infection(uti), and of course gallbladder/gallstone related if stones are present. There are also other possibilities that can be considered by your ob-gyn dr.
See your OB/GYN. They can ultrasound the baby and your gall bladder to see where the pain is coming from.