Q:

How can I respond to well-meaning comments at the gym?

I go to the gym twice a week. I like the people there, I love what I do, my trainer is great. 
The only issue I have, is that, well, I'm fat. I'm tall and fat, and people constantly assume that no matter what I am working on (mostly powerlifting and other strength stuff - I want to build muscle, I don't care if I lose weight), that openly commenting on my weight is okay.
I get a lot of the sort of compliments like "oh I can tell you've lost so much, you look great", "those pants fit you well, you can see how you've lost inches" etc. and I understand people mean well, and they're trying to be supportive. 
The thing is, though, those statements are proveably false. I weigh more now than I did before (yay muscle mass), and my pants etc are the same size they were before I started this journey. I know people are trying to keep me positive because they think I'm there for different reasons than I am, but I don't need that sort of help. I'd rather celebrate my strength.
I've tried telling people the honest truth, that I am there to be strong not skinny, that I haven't lost weight, etc, and either they tell me that can't be true (I've even had people insinuate my scale was wrong!), and that I look "too good to be that size still" etc. 
I appreciate they're trying to be nice, but I just can't stand it - it's hard enough being a fat person in a mostly skinny world, but I hate that I have to seemingly take these "compliments" graciously when they are just weirdly trying to push me to a thinner mold than I will ever fit.
How can I express to people that this sort of stuff isn't welcome, or otherwise avoid the trap of "accepting" compliments that kinda make me feel awkward and uncomfortable? I'm not super close to these people, I just see them 2x a week in passing at the gym. 

A:

The thing with compliments is, they are not about you. Compliments are a friendly tool for social bonding. See my answer to Termatinator's question for details.
In my 38 years experience of social life, compliments are the "currency" of friendly social interaction and the truth of such statements is not considered relevant by most people. Only persons on the autism spectrum and a very few other "sticklers for honesty" might take exception to untrue compliments and everyone else simply accepts the compliments as a social routine. It is a cultural thing to tell people something that will make them feel good, even if it is not strictly the truth. And the gym is all about mutual encouragement anyway. So the easy option (though not the least annoying, in your case) is to ignore those compliments, as succintly advised in the earlier answer.
But if you don't mind taking the risk of disheartening a well-meaning user by "rejecting a compliment" then "thanks, but" is a potent tool and contradicting them politely whenever they utter a "friendly untruth" is very much an option, as in:

Gym friend say, "you are looking so slim!"
You say: "thanks, but I am not."
Friend: oh yes you have lost 5 pounds!
You: nice of you to say so, but I haven't. Nor is it my goal here.
Friend: those pants are literally hanging loose on you.
You: thanks, but they aren't.
Friend: I was just trying to encourage you...
You: I appreciate it but that is not the type of encouragement I need. I am trying to build strength here.

Remember this is socially disruptive and some people will get annoyed with your replies, but they will quickly learn not to give you these compliments you are categorically rejecting as untrue. Try it out next week and give us your feedback for sure!

A:

You could try turning their positive comment into a different positive response.
So 

"You've obviously lost weight"

doesn't become 

"No, I haven't, I'm not trying to"

Instead try ...

"You think so?"/"A lot of people think that"

... then 

"Actually it's just my posture has improved from the weight training
  so I'm standing taller."

Then you have a positive platform on which to tell them about how you're trying to bulk up etc.

A:

"they're trying to be nice"
Since you are already aware of this, my answer should in fact be really easy.
They are trying to be nice but they unknowingly went about it the wrong way and it has had the opposite effect desired. All you have to do is show them how to be nice in a way that you would appreciate. People latch onto your weight as a topic they can nice about because its a common and easily understood reason for people to be at the gym. New people will likely still start off by trying to be nice about your weight but that should quickly be solved if to each of those people you say:

Ahah, I am actually trying to gain muscle, not lose weight. Don't worry though, a lot of people make that mistake.

They have tried to be nice, they want to be nice and you have politely shown them that the way they went about it was a mistake without blaming them and providing a new alternative way that they can be nice to you (complimenting your strength). 
In a situation like this where everyone has good intentions but someone has made a mistake, honest and polite explanations are of mutual benefit to everyone involved.

