How old is the dog? I think that is a major factor in going into any type of surgery. It is always a hard decision and I have been in your a shoes a few times. Kaos my old male had cancer in the stomach, my vet said they could do all kinds of tests and surgery but then it would likely be Chemo and taking parts of his intestine out. I would never do chemo because I have seen how hard it is on dogs just to get a few more months of life and I do not think that is fair. I declined surgery and my vet agreed that it was best not to put him through that. He lived for another 1.5 to 2 years before he passed, the cancer caused a major bleed in him stomach and we finally lost him but he had a great life till then and he was not in any pain with the cancer. He lived to be 12.
Now I have Vixen who has several small tumors that we are watching and we want to take out. She is 10 years old and in much better shape than Kaos was in. Her surgery is going to cost about 700 and we will do it before the end of the year is out. The deciding factor for us is she is very healthy and acts like a 2 year old. Kaos was already very slow and old for his age, he also had surgery a few years back to remove a few fatty tumors and he did not heal well. His body could not take it. Vixen on the other hand should have no problems with surgery.
So two similar cases but 2 totally different dogs and out comes. In your case you have a dog that has a heart problem and to me that is the same and not being in good health and I would not do the surgery at this point. I had a vet diagnose my dog with a grade mummer and they were wrong so getting a second opinion might not be a bad idea.
What I might do in your situation is go to a cardiologist or another vet and have then look at his heart, maybe do an ultrasound and see how bad his heart really is.
Then if they think he can tolerate surgery I would wait and watch the tumor on his gums. The problem with those is they grow fast and even if that shaved it down it will just keep growing. If the dog can go through surgery and is otherwise a healthy active dog then save the money and get it removed. If your dogs is like Kaos and not going to tolerate surgery then just make him very comfortable for the rest of his days.
It is a tough call but I think you have time to think about it and talk to another vet and get another quote.