So there's a few points here.
First, the idea that losing/gaining weight is naturally easier for some people is little more than a myth. It's really a matter of perception. People who seem to have it easy just control their caloric intake and output.
Speaking from personal experience, I used to be jealous of people I thought had "good" metabolism; they seemed to eat so much and yet never got fat. Once I got in shape, now I see it from the other side. People will be amazed by how much I can eat in a single setting... but they don't see the rest of the day (or the following days) where I compensate by eating less and working out. Plus, those giant meals are by and large the exception, not the norm. When you only see a slice of a person's habits, it's easy to assume and extrapolate, which makes it all the more easy to feel hopeless, as if you're doomed from the start. It's a vicious cycle, but just a little awareness can help.
Obesity is not genetic. Period. Certain people may be more predisposed to storing fat, but there's a difference between storing fat and being fat. At the end of the day, being fat, to say nothing of obesity, solely comes from consuming too much and excising too little. It's environmental, and whatever minute influence epigenetics would have can certainly be mitigated with a proper diet. Matter cannot come from nothing, and body fat is no exception.
As for your case, just because you can't exercise doesn't mean you can't lose weight. The dirty little secret of weight loss is that exercise is far, far less important than most would have you believe. When it comes down to it, it's really 80-90% diet. Exercise helps and it's great to keep yourself in shape, but even if you had to remain completely motionless, you can drop the weight. It all comes down to the choices that you make. Have a little less here and there, replace unhealthy snacks with healthier alternatives, chew gum when you're hungry (this was a lifesaver for me), all of these make a big difference in the long run. Weight loss doesn't have to be fast, either. Cutting 50 calories a day might seem like nothing, but over the course of a year? That's 52 pounds. The best part about weight loss is that it incurs momentum; losing becomes easier and easier as you go along. You just need to give yourself a little push.
Don't tell yourself your situation hopeless because that couldn't be further than the truth. Getting over those personal issues can be tough, I've been there, but it's not impossible. If you want to lose weight, it's well within your power.