A lot of times when a person's body is under stress (or pain), it can cause heart palpitations. So I can see how having the underlying condition of gallstones could cause temporary heart palpitations. Gallstones can also cause radiating pain, which in turn it can feel like chest pain but is actually from your gallstones.
I am not certain if that is the case with you or not. I would visit with your doctor further to see what his/her thoughts are to make sure your palpitations are not serious. If they are not serious and you are going to have surgery, you can see if your symptoms subside after surgery.
We hope you find this general health information helpful. Please note however, that this Q&A is meant to support not replace the professional medical advice you receive from your doctor. No information in the Answers above is intended to diagnose or treat any condition. The views expressed in the Answers above belong to the individuals who posted them and do not necessarily reflect the views of Remedy Health Media. Remedy Health Media does not review or edit content posted by our community members, but reserves the right to remove any material it deems inappropriate.