This is a double-blind, placebo-controlled, parallel-group, randomized clinical trial in men, 40-70 years of age, who present with mild to moderate erectile dysfunction and have androgen deficiency defined as serum total testosterone level below 300 ng/dL, measured by liquid chromatography tandem mass spectrometry, LC-MS/MS (15) and/or free testosterone level (measured by equilibrium dialysis) below 50 pg/ml. Sexual function assessments will include validated erectile function questionnaires (IIEF), sexual activity diaries, sexual desire, partner interaction and intimacy, affects balance scale, mood, ED-related quality of life, and penile rigidity in response to a visual erotic stimulus. The initial assessment will be made prior to treatment with sildenafil citrate, i.e., in subjects who are naïve to or withdrawn from PDE5 inhibitors and/or testosterone. Participants will then be allotted three sildenafil citrate tablets per week (12 pills per month), but will not use more than one tablet within any 24-hour period. During the Sildenafil-Dose Optimization period, subjects naïve to sildenafil citrate will start with a 50 mg dose. Those who have used sildenafil citrate in the past will take the same dose that was found to be efficacious for them. After three weeks, the dose of sildenafil citrate will be increased to 100-mg in non-responders. For those who cannot tolerate the 50-mg dose, a dose of 25 mg will be given. After three weeks on the optimized dose of sildenafil citrate, subjects will undergo a second evaluation of sexual function. They will then be randomly assigned to receive this optimized dose of sildenafil citrate with either placebo gel (15 g per day) or active testosterone gel (10 g active gel + 5 g placebo gel per day). The daily dose of active testosterone gel was selected to increase average serum into the upper-half of the normal range for healthy, young men (e.g., 500-1000 ng/dL). In order to assure that serum testosterone levels are in the target range (500-1000 ng/dL), testosterone dose will be adjusted by an unblinded individual two to three weeks after initiation of testosterone/placebo treatment, based on the measurement of serum testosterone levels. If the average testosterone level is less than 500 ng/dL, the daily dose will be increased to 15g of active gel. If the average testosterone is greater than 1,000 ng/dL, the daily dose will be decreased to 5 g of active gel (and 10 g of placebo gel). This dose adjustment will take effect at week 4 (day 28) of treatment. Subjects will be treated for an additional 12-weeks with sildenafil citrate and the optimized dose of testosterone gel or placebo gel. Sexual function will be evaluated at the end of this treatment period.