I know that "what-if" questions are almost non-historical, but then again, there seems to be a rock-solid consensus that Germany was doomed to lose WWII independent of strategy. Yet according to my (admittedly limited) understanding Germany fell really short of reaching Moscow and were a couple teactical moves away from knocking the USSR out of the war. Was Germany actually a final push away from entering Moscow, or is there a reason why Germany would have lost the Western front even if completely focused on it?
The claim that Germany would have won the war on the Eastern Front if it had just pressed on a little more to take Moscow is exceptionally dubious. If the ongoing Siege of Leningrad and the later Battle of Stalingrad are any indication, the Red Army would have held fast and fanatically contested every inch of the city. The Germans controlled up to 90% of the city of Stalingrad at times towards the end of 1942, but this did not avail them in the slightest. All it did was exhaust their reserves and draw their tank forces into the city, which left the Sixth Army overstretched and critically exposed when the Red Army counterattacked in Operation URANUS.
Even if the Germans had successfully entered Moscow, much the same situation would likely have developed as would in Stalingrad: the Germans, as I explain in this earlier answer, were already exhausted and hanging at the end of a critically-overextended supply line, and would almost certainly have had to withdraw once the Soviets counterattacked in the winter of 1941-42.
Sources:
Robert Kirchubel, Operation Barbarossa: The German Invasion of Soviet Russia
Robert Kirchubel, Atlas of the Eastern Front
David Stahel, Operation Barbarossa and Germany's Defeat in the East
To add a more strategic analysis here, Germany needed one of two things to happen by 1942 to win the war.
Seeing as they failed to achieve this, they were left with:
Operation Barbarossa hinged on inflicting mass casualties and seizing population centers to break the Soviet will, and hopefully force a governmental collapse and negotiated peace, as the Germans had accomplished against Tsarist Russia in 1917. But even in 1941, the Germans knew that they needed to do it quickly, as the Soviets could mobilize far greater quantities of men and material than they could. Germany lacked sufficient oil reserves for a long campaign; the USSR didn't. Germany lacked sufficient grain production to feed its own people without importation; the USSR didn't. Germany lacked the manpower to maintain a 3 million man army like the one they assembled to invade the USSR if they started taking heavy losses; the USSR didn't.
Plus, taking their capitol was unlikely to put the Soviets out of the war. They actually lost several of their most populous cities (Kiev and Smolensk, among others) as well as their most productive agricultural region (Ukraine). The Soviets evacuated much of their heavy industrial equipment from these areas before they fell, and reestablished their industry behind the Ural Mountains, out of reach of the Germans.
The last conqueror to invade Russia, Napoleon, actually took Moscow in 1812. The Russians responded by burning the city behind them as they left, to deny Napoleon a place to keep his army during the winter. Even if he had won, Napoleon would likely have offered far better terms to the Russians than Hitler had planned.
German racial ideology identified Slavs as subhuman, and Communism as the inherent enemy of Fascism. Once Russia fell, Hitler planned to execute much of the populace, and force what was left into Siberia to starve while Germans settled in Eastern Europe. Even if the average Soviet soldier didn't know this, the Nazis' brutal treatment of people in areas they occupied, and of Soviet POWs, would have made it pretty clear that defeat meant the extinction of their entire people and way of life. The Germans would have had to push all the way to the Pacific Coast before the USSR would have surrendered.
Had Moscow fallen, it would have been a blow to morale, and probably complicated logistics (Moscow was the center of the Russian rail network), but the government would have responded like it did with any other major city being taken: evacuate vital personnel and machinery, and keep fighting.
Even if they had taken Moscow and somehow forced the USSR to cede its European lands, by the end of 1941 the US had entered the war. It is hard to overstate the industrial dominance of the US at the time. I will edit this to include more statistics once I can access my books (yay College), but the US alone was able to produce more airplanes in 1943 than Germany had in the entire war to that point, by a substantial margin. While also outproducing them in most other areas. And keep in mind the US had little in the way of a military-industrial complex pre-war, with an army smaller than Romania's in 1939.
In 1940, the US started the Lend-Lease Program, whereby we would send military equipment to other nations in order to support their efforts. This was tremendously important, as it gave the Allies a massive industrial capacity that Germany could not touch. This allowed the Red Army to ride into battle at high speed on Studebaker trucks, while the Germans were in many places still using horses and mules for their logistics. It meant that the Soviets had an uninterrupted supply of 100-octane gasoline for their planes, which greatly increased their performance. It meant that the Soviets could still feed their army after losing Ukraine and its immense agricultural capacity. It meant radios for their planes and tanks far better than anything they could make in-country. This would have continued regardless of whether the US entered the war as a combatant.
In order to have any hope of industrial parity, Germany would have had to invade the US, which given their inability to overcome the 90 miles of water between France and Britain, was impossible.
There is no conceivable outcome whereby Germany, given its ideological and political goals, historical leadership, and available resources, could have come out on top without literal divine intervention.
If you have further questions about this, feel free to comment or PM me.