Your five friends were wrong, but their confusion is an understandable artefact of the evolution of English. Consider the following three questions:
- Did you not want to gain some weight?
- Did you want not to gain some weight?
- Did you want to not gain some weight?
The first clearly asks whether the person being addressed wished to gain some weight. The other two ask whether the person being addressed wants not to gain some weight. However, it is common even among native speakers to assume that the order of the clauses in the first question is:
"Did you [not want to gain some weight]?"
The question is thus interpreted as if 2. or 3. were intended.
The problem here, then, is that although you have used a perfectly valid and elegant form of English interrogative construction, your listeners are not sufficiently well versed in their own language to discern the meaning of your question!
The English interrogative construction "Did you not" is rapidly disappearing from common speech, and it is especially likely to be misunderstood by speakers of American idiomatic English. The "Did you" part is interpreted separately, and the negation is attached to the verb to which did serves as an auxiliary.
To express your question idiomatically and in a way that will be clearly understood by native speakers who unfortunately have learned to speak their own language less elegantly (or, as some would say, less archaically) than you do, you should say:
"Diddencha wanna gain some weight?"
If you prefer something less idiomatic, you might consider:
"Didn't you say that you wanted to gain some weight?"