If you look in a Webster's Unabridged Second Edition Dictionary you will only find cardsharp. In the Third Edition, you will find both cardsharp and card shark. Card sharp comes from "sharp" or "sharper," defined as an unduly sharp or canny person; a cheater in bargains; swindler; a cheating gamester.
A shark is defined as a rapacious crafty person who gains by usury, extortion, swindling, or trickery (for instance, a loan shark). It comes from the German schurke, meaning "rascal" or "scoundrel." The development of the term "card shark" was a natural etymological development.
Language is a mutable thing. Words gain acceptability through common usage. If you asked the question in 1930, the answer would have been "cardsharp is the correct term." Today, both are acceptable.