Can weight gain be a sign of a serious medical condition?

Can weight gain be a sign of a serious medical condition?