As seen from the other side of the counter...
Gun dealers are businessmen - or at least they are if they stay in business, and therefore they need to make a profit so they can pay the bills and make a living. Buyers sometimes forget this aspect.
To do all of this the seller has to keep selling product, so that he/she can "turn their money," in other words sell something, get their money out of it, and then use some of that money to buy more product. What ever money they make above their cost is the profit that pays for overhead and makes them a living.
So from the dealers' point of view thay look at what the gun cost them, and how long have they've had it in stock.
If the gun is one that's in demand and likely to move quickly, they will be less inclined to dicker. Put bluntly, they don't need to sell it to you because it's likely another hot-to-trot buyer will be in shortly with money in his pocket.
On the other hand, if this gun is not particularly popular, has been sitting around for a long time, and isn't likely to sell quickly, the dealer will be motivated to move it at his cost or even lower to get his money out of it and go on to something else.
With shotguns and rifles there is a seasonable factor. Hunting season comes in the Fall and then is followed by Christmas. After that sales may be slow until the following Fall comes. The dealer would likely like to move that stock to get his money out of it, and therefore be more likely to accept an offer. This of course does not necessarily apply to "tactical" long arms which are not subject to a season.
Speaking for himself, the Old Fuff often passes on Glocks, SIG's, Beretta's, etc and looks for older revolvers - sometimes with longer barrels. These represent a class of firearms that most buyers aren't particularly interested in, and dealers that are stuck with them are more likely to accept a reasonable offer.
But be sure the offer is reasonable. Dealers have to eat too...