So there are a couple of writeups here claiming that pizza is not an Italian dish, but rather an Italian-American one. Whilst it is undoubtedly true that the thick-base, chewy pizza, laden with toppings and dripping with grease originated in America, the origins of the dish are very ancient indeed.

Pizza is ultimately a bread-based dish, of course. It's known that humans have been grinding up grass seeds, mixing the resulting powder with water and baking dough for many millennia. The obvious step onwards from eating plain dry bread is to add other foodstuffs to it, either before, during or after the baking process. Recipes from Naples from around 1000 AD detail how to make a flat bread topped with herbs and lard cheese.

However the characteristic additional foodstuffs on a modern pizza are, of course, tomatoes and cheese. Tomatoes were introduced to Europe by the Spanish returning from their conquests in South America in the 15th Century. At first they were grown as ornamental plants, but by the end of the 17th Century tomatoes were a recognised food in Europe. By 1839 the first written recipes for tomato sauce had appeared in Italy and this was probably being spread on top of bread by 1850.

In 1889 King Umberto I and his wife, Queen Margherita went to their traditional summer palace in Capo di Monte. Hearing of a local dish called pizza they asked to try it, and the most famous pizza chef in Naples, don Raffaele, was called in to prepare this for them. He decided to create a new pizza in their honour, on which he put tomatoes, mozzarella cheese and basil, so that the red, white and green would reflect the colours of the Italian flag. The pizza was a resounding success and don Raffaele named it "pizza Margherita" in honour of the queen. This is also usually considered the turning point from where pizza ceased to be a food fit only for peasants and the lower classes.