The Affordable Care Act included a provision to gradually eliminate the Medicare prescription drug coverage gap between 2011 and 2020, which substantially lower medication costs in the gap. Using 2007–2016 Medicare claims data, we estimate how filling the gap affects individuals’ out-of-pocket spending and medication use, separately for branded and generic drugs. One important difficulty in estimating the policy impact is that around the same time, many blockbuster drugs commonly used by the Medicare population experienced patent expiration and began to see generic entry. Because generic entries affected different therapeutic classes at different times, we run difference-in-differences models by therapeutic category at the beneficiary-month level to isolate the effect of the gap closure from that of generic entry. Overall, we find that filling the gap substantially reduced out-of-pocket spending and increased the use of branded drugs, which had larger discount rates during the analysis period. Beneficiaries reaching the gap, at older ages, or with comorbidities experienced larger reduction in out-of-pocket spending. We show that without accounting for generic entry, the effect of filling the coverage gap on medication use is underestimated for branded drugs and overestimated for generic drugs.