Background: Optimal timing of gestational tetanus-diphtheria-acellular pertussis (Tdap) vaccination is not well-defined. No well-established specific anti-pertussis antibody level correlates with protection, suggesting the importance of antibody quality such as avidity. We aimed to determine the effect of timing of vaccination with Tdap in pregnancy on the avidity of cord anti-pertussis toxin (PT) immunoglobulin G (IgG). Methods: Prospective study of newborns in a tertiary hospital (Melbourne, Australia) born to women vaccinated with Tdap in pregnancy. Ammonium thiocyanate was used as a bond-breaking agent to measure the avidity of anti-PT IgG using concentrations between 0.25 M (to measure low avidity antibodies) and 3 M (to measure very high avidity antibodies). Anti-PT IgG levels achieved at each ammonium thiocyanate concentration in cord samples of women vaccinated during 28–32 weeks gestation (WG) vs. 33–36 WG, and women vaccinated 5–12 vs. 1–4 weeks prior to delivery were compared using t-tests. Results: Newborns of women vaccinated with Tdap during 28–32 WG (n = 43) had statistically significant higher concentrations of medium and high avidity anti-PT IgG compared with newborns of women vaccinated during 33–36 WG (n = 47), 11.6 IU/ml (95% CI, 8.8–15.2) IU/ml vs. 6.7 IU/ml (95% CI, 5.2–8.6) and 10.1 IU/ml (95% CI, 7.4–13.8) vs. 5.7 (95% CI, 3.6–8.9) IU/ml (p = 0.007 and p = 0.035), respectively. Newborns of women vaccinated 5–12 weeks before delivery (n = 64) had statistically significant higher concentrations of high and very high avidity anti-PT IgG compared with newborns of women vaccinated within 4 weeks before delivery (n = 25), 10.3 IU/mL (95% CI, 7.9–13.4) vs. 3.3 IU/mL (95% CI, 1.7–6.4), 12.6 IU/mL (95% CI, 9.4–16.9) vs. 4.3 IU/mL (95% CI, 2.2–8.5) (all p < 0.03), respectively. Conclusions: Quantification of levels of anti-PT IgG with different avidities demonstrated that pertussis vaccination 5–12 weeks before delivery was associated with higher anti-PT IgG avidity compared with vaccination within 4 weeks before delivery. Pertussis vaccination during 28–32 WG was associated with higher anti-PT IgG avidity compared with vaccination during 33–36 WG, supporting vaccination at 28–32 over 33–36 WG for optimal protection against pertussis in infancy.