How does an LED connect in a circuit?
The definition of anode and cathode is different for different devices. The anode of a device is considered to be the terminal that the conventional current flows into and a cathode is where the current flows out from. For a conducting LED the current flows into the longer leg (positive terminal), which is why it is considered the anode, and then flows out of the shorter leg (negative terminal), which is then considered the cathode. For a discharging battery however, the cathode is the positive terminal (where conventional current flows out from) and the anode is the negative terminal (where current flows in).

You could look at it a different way and say that the cathode repels cations (positive charge) which is why conventional current flows away from it, and anodes repel anions (negative charge) thus conventional current flows towards it.