Type 1 diabetes is caused by an autoimmune reaction that limits the pancreas ability to produce insulin. Type 2 diabetes is mainly caused by insulin resistance and several other environmental and genetic factors. The third type is gestational diabetes caused by hormonal changes during pregnancy.