Both gout and sesamoiditis cause pain in and around the big toe joint of the foot. That is about the only thing that they have in common. They are both two totally different entities caused by two totally different reasons and treated by totally different interventions.
Gout is metabolic disorder in which urate crystals are deposited into vulnerable joints, most often the big toe joint of the foot. It is treated with dietary changes and the use of drugs. The pain from gout is much more severe than sesamoiditis and is not affected by weightbearing. The pain from gout is more inside of the joint rather than under the joint. The pain can be worse at night.
Sesamoiditis is an overload disorder to the small bones under the big toe joint. The pain from sesamoiditis is worse on weightbearing and can be reproduced by palpating the sesamoid bones under the joint. The pain is usually not felt when not weightbearing on it. Sesamoiditis is most commonly treated by activity modification and protective padding.