From history's earliest beginnings there were inns and rest stops that offered food to weary travelers and pilgrims. The food was indifferently prepared, and a good meal was one that didn't make you sick. (I suspect that in medieval times the inns along the pilgrimage route to Compostela in northeast Spain were places where pilgrims from all over Europe exchanged cooking tips with the host, and perhaps this was true of the hostelries in ancient times too, but if so there is no record of this.) But where were history's first restaurants to offer meals that compared to home cooking, meals that would make an ancient Chowhound happy?
My candidate for the first restaurants to do better were the public baths of Imperial Rome. These were grand affairs of porphyry and marble. Open to anyone (both sexes) who could pay 10¢ in present-day money, these offered far more than baths. Patrons could exercise in health clubs or get a massage, followed up by a warm or hot sauna, a hot bath, a cold dip and then a swim. Then on to various salons that offered music, philosophy or science lectures and classes, or places to meet, chat and flirt. There was a restaurant that offered dinner. My guess is that the food, so as not to be out of place in such an elegant establishment, would be very good indeed. So I think these were the first restaurants to offer gourmet repasts. Or did another civilization beat the Romans to it?
Note: some historians say the food at the baths was primarily sold by vendors. The vendor food was probably chow-worthy if not safe. (One kind of sausages often sold by vendors, botula, gave its name to food poisoning.) For more on vendor food at Roman baths, see http://www.pbs.org/wgbh/nova/lostempi... This link incorrectly refers to Apicius as a chef. He was a rich gourmet. He spent all his money on food and when he was down to his last $3 million he killed himself rather than live in what he considered poverty.