The phrase originates from horse racing, where a 'neck' is the literal margin of victory. He's an avid gambler and often bets on horses that win by a neck.
Pro Tip 2/3
Close Competitions
Use 'by a neck' to describe very close competitions, not just races, to emphasize how narrow the win was. She won the spelling bee by a neck, with the final word tipping the scale.
Pro Tip 3/3
Figurative Use
The phrase is often used figuratively, meaning it's not about actual physical distances. The incumbent politician won the election by a neck, just a few votes.