If erectile dysfunction is an ongoing issue, however, it can cause stress, affect your self-confidence and contribute to relationship problems. Problems getting or keeping an erection also can be a sign of an underlying health condition that needs treatment and a risk factor for heart disease down the road.