Post 1/2
First of all I think you should define the parameters of your question a bit more. What do you exactly mean by powerful and powerful compared to what and in which regard.
Just some background on me since this is my first post here.. I do have an MA in History however I am a medieval historian and therefore my expertise is not in modern history however I am a German citizen and as such on the receiving end of 12 years of history, specifically German history, in school so I think I should be able to at least provide you with a starting point.
Historically Germany only became a state/country in 1871 when Prussia together with the members of the Norddeutsche Bund and smaller German states invaded France in 1870. The Deutsch-Französische Krieg ended with a complete surrender of France and the procclamation of Wilhelm I of Prussia as German emperor. If you are interested on how that came to be you can always check up on other sources, it involved years of prepartion by Otto von Bismarck, his Reichskanzler, also known as the "Iron chancellor" and his policies of blood and iron as well as basically bribes to remaining German monarchs outside of the Norddeutsche Bund. Furthermore there had been several smaller scale wars before 1870 to solidify the Prussian holdings and expell Austria from the German territory in a way to basically end the always looming question whether a unified Germany should involve Austria (Großdeutsche Lösung) or not (Kleindeutsche Lösung) going back all the way to 1848 and the so called German Revolution and the Paulskirchen Parlament. Suffice it to say the end result was a federal state (in essence like it is today) in which the local monarchs still held substantial power and with vast differences in laws (for example voting rights for the state parliaments were immensely different in each state).
Before that Germany wasn't that powerful. Yes the Holy Roman Empire could be a force, but only when a powerful emperor would rule it (think Friedrich Barbarossa or Otto the Great) otherwise it was massively split with Dukes and other feudal lords basically being in a position to force a weak emperor to please them and even then they did not always comply with his wishes (even strong emperors could have unruly subjects like Friedrich Barbarossa's Heinrich der Löwe). It's also fairly questionable from which point on one could truly speak of Germans or a German empire here. Most people would have considered themselves Bavarian or Saxon etc. instead of German and even in 1848 the idea of a unified German state and a unified German nationality wasn't embraced by the vast majority of people. How weak the HRE became can be seen in the ease with which Napoleon Bonaparte defeated the HRE and Austria and Prussia with a centralized French state and military in 1806 and how he basically abolished it in a stroke and replaced it with the Deutsche Bund (which is essentially nearly Germany in it's contemporary borders)
So let's get back to 1871. The reason why Germany was able to overcome many nations that had centralized much earlier like England and France was for one it's size and population which, to this day, is several million people more than both those countries. Germany also didn't have a colonial empire to drain it's ressources (although it would come in time, however to a much smaller extent than Britain or France). Germany did have a vast amount of iron and coal which means that it could effectively overtake Britain on the industrialization front once all the economic areas had been unified. Prussia had also a very good school system which was basically started as a reaction to the loss of 1806 by Wilhelm von Humboldt as well as a well organized military which was also reformed as a reaction to the defeat of 1806 by Gerhard von Scharnhorst and other high officers. All those advancements would bit by bit be adopted by the other German states after 1871 giving Germany a highly organized military and a great school system (for it's time) leading to a generally well educated work force and well led military. Otto von Bismarck also pushed through the compulsory education in all German states, meaning that even farmers children now had to attend school. The German state became more centralized and given it's position at the heart of Europe it also remained a major trade hub. All of those factors and more led to Wilhelm II being able to wage WWI, as he, and indeed the general public felt, that Germany could basically overwhelm every other nation in Europe with ease.
So to answer your question the first "rise" of Germany was due to being run as a fairly modern country, unlike France and England, having one man in charge for the beginning who knew what he was doing most of the time, Otto von Bismarck, and having a wealth of citizens and natural ressources.
After WWI and the Treaty of Versailles things in Germany didn't look too great. However through the influx of American credit and the education Germany was able to recover from hunger and death in 1919 and bounce back. It's also important to note that WWI had not touched German soil (besides the parts of Germany that were taken away as reparations) and so the German economy, despite being mostly forbidden from manufacturing military equipement was mainly intact. The education itself can be attested to by the Nobel Prize Committee between 1918 and 1945 German citizens won 26 Nobel Prizes (7 in Physics, 11 in Chemistry and 6 in Medicine). All of it led to a tremendous economic boom known as the Goldene 20er which also influenced culture (see Thomas and Heinrich Mann, Erich Kästner, Berthold Brecht, Erich Maria Remarque etc.). Yes German, like many other countries, suffered from a severe recession following the crash on Wall Street with American capital being pulled and still had to pay off huge sums on the Treaty of Versailles BUT the economic crisis was nowhere near as bad as some Historians will have you believe. Many economic policies that Hitler would adopt (like state employment in huge projects) where already under way during Heinrich Brüning's administration and unemployment was also already falling. Furthermore Germany could still draw on vast amounts of coal and iron as well as steal mined and smelted, not exclusively but on a grander scale, in the Ruhrgebiet. Many large German companies were also very happy to have the state run up debt since they were being promised future payments from war profits.
So all in all the second rise was due to American money, technological advancements and the general strength of the German economy which had not been touched during the war years. The rise was basically inenvitable the question here is what Germany did with it.