Which was the longest winning streak in Olympics in the same specialty?
For individual events, the longest streak is 4 Olympics. This was first done by athlete Al Oerter (US) in the discus (1956, 1960, 1964, 1968).
This feat was equalled by Carl Lewis (also US) in the long jump (1984, 1988, 1992, 1996), then by swimmer Michael Phelps in the 200m individual medley (2004, 2008, 2012, 2016).
But if you consider team events, the longest streak stretches to 6 consecutive Olympics, by Hungarian fencer Aladár Gerevich in the Team sabre event (1932, 1936, 1948, 1952, 1956, 1960). The games weren't held in 1940 and 1944 due to World War II, hence the gap. Gerevich was 50 years old by 1960. This streak is recognized by Guinness World Records as being the longest ever.
An honourable mention also goes to Pál Kovács, who was a teammate of Gerevich, missing out only in the 1932 Olympics, and also collecting 5 consecutive gold medals.
This answer was based on this wikipedia list.