"B" stock usually refers to items that are manufacturer stock items used for display purposes at shows, items with slight cosmetic damage, returns from dealers or items that have been returned and no problem has been found - possibly the owner couldn't operate the unit properly. Refurbished units are typically just that though the refurbs could include some of the last category from "B" stock.
Gray market product is any item sold in a region of distribution where that particular piece of equipment was not intended to be shipped. Almost always it refers to a product that is shipped into a region with the intent to defraud the consumer in some fashion.
Products meant for the European market and sold in North America will be gray market items. Every manufacturer which deals in international distribution will designate which products go to which region and this is always indicated in the serial number. If a product's serial number contains the letter "X" in the third position (for example), it is meant for European distribution. If that item is subsequently sold in the US, it becomes gray market product and it can be identified as such since American region products will not contain an "X" in the third position. Frequently the serial numbers on gray market product will be defaced to hinder identifying and tracing the origin of the item. Almost every international manufacturer will state clearly they will not honor the warranty on gray market items whether the buyer is aware of the situation or not.