Was the gold standard a monetary union? In the previous question here, one comment said:

&quot;Currency unions to work properly need either perfect mobility of all factors of production (i.e. free migration/capital flows etc) or fiscal union&quot;.

However, I remember our professor at university once mentioning that gold standard worked like a monetary union. In past countries did not had fiscal unions and people could not move around as easily as today. How come that the gold standard was able to exist? Or was gold standard not monetary union?
tl;dr:
That quote refers to conditions for currency area/monetary union to work optimally. Even sub-optimal monetary union can exist. Furthermore, the gold standard existed in era of relative stability, low government spending and actually in era where movement of labor and capital was virtually unrestricted. As soon as that era ended gold standard collapsed. So it was able to exist because at the time conditions were favorable for it.
Full Answer:

was gold standard not monetary union?

Technically they are not completely equivalent, but they are both very similar as they represent an extreme regime of fixed exchange rate. Consequently, many economists draw parallels between gold standard and monetary union. For example, Eichengreen &amp; Temin (2010) in their paper Fetters of gold and paper also argue that gold standard and European Monetary Union (EMU) were virtually equivalent, so your professor is not wrong.

How come that the gold standard was able to exist?

Well first lets correct some incorrect premises. You write:

In past countries did not had fiscal unions and could not move around as easily as today.

The first part is generally correct, however the second part (where I assume the moving refers to movement of different factors such as labor/capital) is not correct. In fact prior to WWI people could move around the world relatively more freely than today. Most countries did not even have passports for their citizens. When it comes to capital arguably there were also less barriers to capital flows. For example, Keynes, who lived in the era of gold standard, argues in his book economic consequences of peace that:

“What an extraordinary episode in the economic progress of man that age was which came to an end in August 1914!
...
The inhabitant of London could order by telephone, sipping his morning tea in bed, the various products of the whole earth, in such quantity as he might see fit, and reasonably expect their early delivery upon his doorstep; he could at the same moment and by the same means adventure his wealth in the natural resources and new enterprises of any quarter of the world, and share, without exertion or even trouble, in their prospective fruits and advantages; or he could decide to couple the security of his fortunes with the good faith of the townspeople of any substantial municipality in any continent that fancy or information might recommend.
He could secure forthwith, if he wished it, cheap and comfortable means of transit to any country or climate without passport or other formality, could despatch his servant to the neighbouring office of a bank for such supply of the precious metals as might seem convenient, and could then proceed abroad to foreign quarters, without knowledge of their religion, language, or customs, bearing coined wealth upon his person, and would consider himself greatly aggrieved and much surprised at the least interference.
But, most important of all, he regarded this state of affairs as normal, certain, and permanent, except in the direction of further improvement, and any deviation from it as aberrant, scandalous, and avoidable.
The projects and politics of militarism and imperialism, of racial and cultural rivalries, of monopolies, restrictions, and exclusion, which were to play the serpent to this paradise, were little more than the amusements of his daily newspaper, and appeared to exercise almost no influence at all on the ordinary course of social and economic life, the internationalisation of which was nearly complete in practice.”

Furthermore, also empirical research shows that in the pre WW1 era there were large capital flows between poor and rich countries (see the sources provided in this answer). So the premise that factors could not move easily in the era of gold standard is false.
Next, the comment you quote was actually mine and note I was specifically talking about conditions for currency unions to work 'properly' i.e. to be optimal (sorry if that was not clear). A monetary/currency union does not need to be optimal to exist.
This being said note that gold standard did actually broke down because gold standard tended to exaggerate asymmetric macroeconomic shocks (see the previously cited Eichengreen &amp; Temin) and it did broke down after WW2 where the kind of globalization and international mobility (which could mitigate the above mentioned shocks) was all but lost.   In fact as measured by value of exported goods as share of GDP, the world only as late as in early 1980s reached the same level of globalization as in 1914 and when it comes to international mobility arguably there are still more restrictions on it than in 1914.  Although in form of  Bretton Woods system Gold Standard technically lasted till 1970s, Eichengreen and Temin argue this was largely due to  ideological reasons, and generally the system was not considered successful.

Furthermore, one of the reasons why gold standard also broke down was that as government spending  and government debt increased after WWI and WW2. This put pressure on governments to monetize their debt and finance portion of their spending through seigniorage. The pre-WW1 gold standard era was also an era of relative stability (macro-economically speaking) as argued by Eichengreen &amp; Temin and sources cited therein. In contrast the interwar and post WWII period was from macroeconomic perspective much more turbulent (Great Depression, Oil Shocks, recent Great Recession etc.). When times are ‘good’ it is much easier to sustain suboptimal monetary union then when economy is expecting macroeconomic shocks, especially asymmetric ones, as smoothing out asymmetric shocks requires countries to adopt different monetary policies or some sort of fiscal transfers (See DeGrauwe Economics of monetary union).