An American idiom referring to a container that one takes leftover food home from a restaurant meal. The theory behind the idiom appears to be that one is taking the food home to feed one's dog, despite the fact that most people food isn't that great for dogs. In fact, it might have originated from a desire to conceal the fact that one was taking home food for oneself for some reason. It is different from take-out (take-away for those of you on the other side of the pond) in that the intention is to consume the meal at the restaurant.
Using this idiom out of the country can lead to problems, as I discovered once when I visited Montreal on a band trip. I had been unable to finish the mysterious "undressed" pizza I was brought (it resembled a Supreme pizza), and so asked the waiter for a doggie bag that I might be able to take it back to the hotel. The waiter replied with the surprising statement, "You can't feed that to a dog!" apparently due to French being his first language. Fortunately, a friend whose French classes had stuck with him better was able to help me.
Alternative Spelling: doggy bag