Nixon had a double digit lead over Humphrey after the conventions. Humphrey narrowed it to to close to call by election day. Nixon won comfortably in the electoral college, but popular vote was close. Nixon lost some votes to Wallace who ran as a law and order candidate too.
I think what made it close in the end was LBJ started bombing North Vietnam. It made Humphrey’s numbers go up some and made the race closer that it should have been.