Millions of dollars have poured into bets on who will win the US election after a last-minute court ruling opened up gambling on the vote, upping the stakes on a too-close-to-call race that has already put voters on edge.