Canadian paleontologists have answered the old conundrum by closely studying a fossilized dinosaur nest:
LiveScience.com, via Yahoo! News:
…[I]nterpreted literally, the answer to the riddle is clear. Dinosaurs were forming bird-like nests and laying bird-like eggs long before birds (including chickens) evolved from dinosaurs.
“The egg came before the chicken,” Zelenitsky said. “Chickens evolved well after the meat-eating dinosaurs that laid these eggs.”
…
The fossil nest was collected in the 1990s and kept at Canada Fossils Limited in Calgary, Alberta. That’s where Zelenitsky first spotted the remains, which were labeled at first as belonging to a duck-billed dinosaur, an herbivore….
Zelenitsky realized that the nest and eggs actually belonged to a small theropod, a meat-eating dinosaur. In particular, the egg-layer was likely a maniraptoran, the group of theropods that paleontologists think birds derived from some 150 million years ago during the Jurassic Period.
If you’re curious, this is what a maniraptoran (or “hand-snatcher”) looked like. Specimens found in China had long plumage, and the group includes the Bambiraptor, which is a funny name until you realize it (kind of) means “baby snatcher.”