Paulinho scored a last-gasp winner to beat Cardiff and send Spurs into second in the Premier League on Sunday.