There could be some argument that the seizure of property from the displaced and murdered peoples helped finance their war efforts, but ultimately this is a red herring that relies on simplistic understandings of economics. Most of Nazi rebuilding and rearming was financed on the back of cooked books and deep deficit spending. Once the war was on in earnest, a great deal of their economic output depended on slave labour, not selling gold or paintings.
Let's put aside moral judgements and really talk about the Holocaust purely in economic terms. Killing Jews, Roma, political dissenters, homosexuals, and others, and seizing their property gives government coffers a slight boost at the beginning of the war. Other than giving a boost to Topf and Sons that they probably didn't expect, this is pretty much where the direct economic benefits of Jewish persecution and the Final solution ends.
So, was that gold worth it? Even by early 1941, the trading relationships Germany had on the international stage were beginning to break down. What can you buy if there's no one to buy from? Certainly from 1942 onward, their import partners were pretty much limited to Switzerland and Sweden, which while providing important trade goods, were in no position to refuse that trade. Gold trade with Switzerland was almost certainly more about laundering ill-gotten gains for specific party members than it being was required for trade; if Germany demanded the Swiss to merely accept Reichsmarks, what choice would they have?
Well then, what about the costs? The first and most obvious is that you have robbed your country of the labour, both physical and mental, of these individuals. Even discounting the economic (and military) benefits of some of the Jewish scientists and engineers that either fled or were killed in the lead up and during the war, the fact is we are talking about at least losing 3-4M productive workers, at least half of which could also be soldiers. One of the great weaknesses of Germany during the war was manpower shortages, often chronic ones. Indeed, this is what saved many Jews' lives, since interventions by men like Speer placed the focus on winning the war over killing the Jews. This isn't to suggest that Speer was a good guy, he just had a bit more realistic priorities. However, even here, the Nazi attitude towards the 'subhumans' like Jews, Poles, and Slavs, and even Czechs, meant that they used force to get what they wanted. Slaves will only work as hard as it takes not to die, and often the Nazis pushed them even harder so that they were worked to death. How much harder do those people work if they are working towards a victory they believe in?
While they are likely untrue, there are many stories/myths that the trains heading west, carrying Jews and Slavs from newly captured territory in the East, actually took priority over trains heading east carrying much needed supplies for the army. This is pretty much an allegory for the viscous racist nature of Nazi Germany. Could they have won the war without the Final Solution? Without their terrible treatment of Slavs in the East who initially embraced them as liberators from the Soviets? Without turning everyone who wasn't Germans into slaves as beset as they could? I don't know the answer. But I do know that doing all those things sure didn't help them in any way.
Was the Final Solution economical? No.
/u/estherke did a fantastic answer to a similiar question on the operational costs of Operation Rheinhard, which were quite minimal, and the immediate economic gains for the Third Reich, which could be quite substantial.