I agree with Krishna's explanation and that a better, more standard phrasing is 'sometimes you have to make the sacrifice'. But, the use of 'got to' or 'gotta' is a more informal, conversational way of expressing 'have to' or 'must' . You will see this type of phrasing among younger people or people who speak more informal English.