To determine the prevalence of myasthenia gravis (MG) and the rate of concurrent autoimmune diseases in patients with MG. Using the Swedish health and population registers, during the period 2005-2010, we conducted a nested case-control study of patients with MG (n = 2045) with five age- and sex-matched population-based controls per case. Register-based MG diagnosis was validated against the Stockholm MG Cohort. Similar nested case-control studies were conducted in patients with multiple sclerosis (MS), as a neuroinflammatory disease control, and siblings of patients with MG. Odds ratios (ORs) and their 95% confidence intervals (CIs) were calculated as a measure of the association between MG and other autoimmune diseases. The prevalence of MG was 24.8/100,000, and patients with MG had an increased risk of another autoimmune disease compared to controls (22.0% vs. 8.9%; OR: 2.82, 95% CI: 2.49-3.20); this risk was stronger amongst younger persons and women. Polymyositis/dermatomyositis, systemic lupus erythematosus and Addison's disease, three conditions regulated by the HLA-B8-DR3 haplotype, were most strongly associated with MG, especially early-onset disease. HLA typing in the Stockholm MG Cohort showed that early-onset MG was indeed dominated by HLA-B8-DR3. The risk of another autoimmune disease was increased in both patients with MS and siblings of patients with MG, compared to their respective controls, but to a lesser extent than in patients with MG. Our results suggest that MG shares risk factors with other autoimmune diseases, to a greater degree than MS, with a particular role of the HLA-B8-DR3 haplotype, especially amongst younger and female patients.