Dealers buy cheap, and sell at retail prices. They have wiggle room to barter with clients. It's been that way forever, not just with coins, but everything really. e-bay isn't always a good place to get coin prices, as it's a wack fest most of the time now a days. It's a good reference though.
If you wanna know what a coins worth, meaning what it should sell for to a private party, then look it up in the Red Book, and deduct about 15% of that price, sometimes up to 25% depending on the coin/etc. Also, there is the PCGS price guide online that's a decent reference. Coins usually sell for about 75% of that price. Sometimes a coin will be "hot" and is selling for more than the price guide.
If your a dealer, there's the greysheet, which is a monthly publication that dealers buy with updated coin prices. It also lists what percentage of the price they should buy the coins for, based on the grading. It'll look like this:
CDN Certified Coin Market Indicator for the coin price guide
PCGS: 83.54%
NGC: 78.27%
ANACS: 57.60%
ICG: 79.66%
PCI: 50.12%
SEGS: 48.97%
NCI: 39.94%
INS: 28.56%
http://greysheet.com/
This brings me to my next point, that different grading companies sell for different prices. Anything graded by PCGS will sell for the highest price. Etc.
If the coin isn't graded, it's worth whatever you can get someone to pay for it. Sometimes you can sell rare errors (1941/2 merc dime) ungraded for a good amount of money if you sell to someone who knows grading well and has a good eye. They'll recognize it for what it's worth.
About the dealers, I try to avoid selling coins to them. Never have actually, as they won't pay but about 50% of what it's worth. I sell to private collectors. I took 10 ounces of Silver bullion into a coin dealer (silver bars/etc) and couldn't even get that jerk to pay spot price. It was only $5 difference, so I didn't argue, but it was still hilarious.
Also, if you have super high value or rare coins, the best place to get top dollar is the Heritage Auction house. Just look at their web-site for ideas.