There are two claimants for this honour. Ctesias seems to attribute the gardens to Queen Semiramis, 811-808 BC—at least, his description of them comes right in the middle of his discussion of her other building works at Babylon. But Ctesias' text was later contaminated, and in many versions it now looks as if he meant to attribute the gardens to Nebuchadnezzar II, 605-562 BC, instead.
Before his text was similarly contaminated, Clitarchus also apparently attributed the Hanging Gardens to Semiramis—at least, his description of them was set right in the middle of his outline of Babylon as built by her.
But Berossus, the Babylonian priest—who called all Greek historians liars—attributed the gardens to Nebuchadnezzar.
So today, a superficial reading of all these sources suggests that majority opinion favours Nebuchadnezzar, and that Semiramis is a distant possibility at best. And unravelling that problem takes you straight into a whole lot of taboo areas and risks making you look foolish.
The issues surrounding these two possible garden builders are deeply ingrained in our Western culture, and they tend to force us to favour Nebuchadnezzar over Semiramis. So let's examine those issues and see if we can make an impartial decision about who built the Hanging Gardens of Babylon.