Complex sentence: A gaffe is usually made in a social environment and may come from saying something that may be true but inappropriate.
Split into simpler sentences: A gaffe is usually made in a social environment. The mistake may come from saying something that is true, but inappropriate.