More education leads to higher pay but the gender gap is greater among those with a bachelor’s degree than among those without.