Antidiscrimination laws in about 22 states specifically prohibit doctors, hospitals, and medical facilities from refusing to treat people just because of sexual orientation. About 14 of those states also prohibit medical providers from discriminating based on gender identity.
Citing religious beliefs, some doctors and clinics in these states have refused treatment to LGBT people despite the laws requiring that they provide treatment. However, none of the state antidiscrimination laws recognize an exception for religious beliefs. In a recent case, the Supreme Court of California unanimously ruled that medical clinics must comply with California's antidiscrimination laws, regardless of the religious beliefs of those working in the clinic (the case is called Benitez v. North Coast Women's Care Medical Group). To learn more, and for a list of states with antidiscrimination laws, see Nolo's article Healthcare Antidiscrimination Laws for Gays and Lesbians.