Never give self-improvement products as gifts unless you have sure knowledge that that person wants that exact product AND you and they have a relationship where you discuss the relevant problem freely.
(“One fan sent me this gorgeous gift basket filled with Vidal Sassoon hair care products, and I was thrilled, and then I saw it was all for dry, damaged hair…” - Margaret Cho)
As someone who has struggled with my weight for most of my life I can only say it would depend on who gave it and when in my weight loss/weight gain cycle they gave it to me. Last year at Christmas I had lost 42 lbs and I was still working on losing weight and one of my gifts was a bathroom scale. I was really excited! Then as the months passed I gained the weight back again with an additional 25 lbs. That would not have been the time to give me a bathroom scale. If it is given at a point when the recipient feels they would genuinely get use from it and enjoy the fact that you are so supportive of their weight loss decision that would be a great gift. However if at this point he is mentally exhausted by all the dieting and the focus on his weight and he is needing to take a break and focus his energy elsewhere (which may not be obvious to observers) this would be a horrible time to give such a gift.
I would say don’t risk it. Find him a different gift and just rave about the book in hopes that he will borrow it from you or buy his own copy.
What if you bundled it with other athletic stuff ('cause you said he’s going to the gym too)? Like get him that book and one about training at the gym, then it’s more of a “training” gift, rather than a “weight loss” gift.
I guess that totally depends on how enthused he is about his gym membership and if he enjoys it as a sport rather than just for weight loss. Yeah, too many variables to guess without knowing him personally.