This is a slang term roughly equivalent to the word everything.

Most commonly, it's used in relation to food bought from a vendor or at some over-the-counter establishment such as Subway. If you were to order a hot dog and wanted catsup, mustard, relish, onions, sauerkraut, horseradish and jalapenos you would just say, "gimme the works" and the vendor would pile on a little of everything he had.

This also applies to non-food items such as computers and makeup. Although in the realm of makeup, it would refer to having everything done, rather than having some of everything.