Hamburger SV was started in 1887 as SC Germania, an athletics club that only played football because of the involvement of english expats. HSV spent the early years of its history winning its regional leagues and combining with other clubs in the area. After the first world war they were reassembled by the combination of other local clubs to form HSV as we know it today, and reached the top tier of german football.
Since then HSV never been relegated, playing in Germany's top tier since 1919.
A few years after reaching the top flight, HSV found themselves competing for the National Championship against FC Nuremberg. This championship ended up being one of the longest in German history as the match was called off after a three-hour tie due to darkness. In the rematch HSV was given the title because FC Nuremberg only had 7 men left on the field due to injuries and fouls. Although HSV were technically given the title, they did not accept the trophy for good sportsmanship. However, they did get to hold the trophy the next year when they won the national championship again.
During the time of Nazi Germany, HSV were very successful capturing their regional title 5 times but never taking the national title. However, like all German soccer teams at the time, they were disbanded. Coming back in 1946, they were very successful, winning the championships of the British Zone Championship all the years they were held. Also they toured the United States in 1950, being the first team to do so after the second world war. Hamburg toured the country beating all star teams in major American cities, including playing the Chicago All-stars in Soldier Field, in front of a crowd of 27,000. There's a fantastic piece by ESPN FC that goes further into this tour and Hamburg's connection with American soccer.
HSV were very successful in their league in the 50s and early 60's, winning multiple championships and scoring scoring over 100 goals in a season 4 times. A lot of these goals came from club legend and german international Uwe Seeler, who scored 267 goals in 237 Oberliga matches and 507 in 587 appearances.
HSV were one of the first teams to be invited to the Bundesliga, and have stayed in the Bundesliga since, a feat that not even Bayern or Borussia Dortmund were able to match. The club defeated BVB 3-0 in the 1963 DFB Pokal to take home their first German Cup in it's history. They were very successful in german football for the next fews years, reaching cup finals and competing in the table regularly.
The club reached its peak with two key hirings in the 70s. Liverpool legend Kevin Keegan joined the team and won two Ballon D'ors with the german side in the 70's and Yugoslavian coach Branko Zebec was promoted to the team's manager in 1978. With these two, HSV won their Bundesliga title in 1979. HSV then had a very good European cup campaign, beating Real Madrid to move on to the final, where they would lose to Nottingham Forest. The Zebec era of HSV didn't last long though, as the club dismissed him due to his drinking problem in 1980.
After Zebec, HSV's most successful manager in club history would take the reigns, Ernst Happel. They would go onto win 3 Bundesliga titles in a row over the next few years. In 1982 they went on a 36 game undefeated streak, a record that would hold until Bayern broke in in the 2013 season. Also under Happel, the club won their only European cup when they defeated Juve 1-0 to become one of the three German teams to win the European Cup.
Since then, the club has had many troubles, nearly avoiding relegation a few times over the years and running into financial difficulties. Even though the club hasn't seen its best days in the past 10 years, it has managed to stay up in the top league further continuing its streak of top league seasons. With some of the most wild fans in Germany to help the team in times of triumph and misery, HSV will be sticking around for awhile in the Bundesliga.