You got sniped. There are services that let you jump in with a bid in the very last seconds and top your bid. You don't have time to react and bid again. I use that all the time. There's no point in bidding until the very last second. Waste of time.
Some people have bidding programs which turn on 2 seconds before the end of the auction and snipe the product form the honest bidders. I don't understand why eBay permits that sort of thing, but they do.