A urologist is trained in diagnosing and treating erectile dysfunction but an internist or your primary care doctor might be able to screen common issues leading to ED.