To arbitrarily say one way or the other that you need to spend more or less time in the gym is pointless. There are much more important factors to consider.
Forget about how long you're in the gym. As long as you're doing a GOOD program, you're fine. A good program has already been written by an experienced trainer or coach, and has been time proven by hundreds, if not thousands of athletes.
For recreational bodybuilding purposes, these kinds of programs are the 5x5, HST, DFHT, Super-squats, etc.
If a good program takes you 3 hours, than so be it. Its 100x better than doing a shit, pussy ass program for 45 minutes.
That being said, the best athletes in the world do long workouts. Westside barbell has consistantly produced champion powerlifters, and they do tons of volume. Its not out of the ordinary for them to do 14-31 workouts a week.
The Metal Militia has produced some of the best benchers in the world, and they train their bench press twice a week. Once for 3 hours, and the second time for 2 hours.
The best Olympic lifters in the world, be it in Iran, Russia, Bulgaria, or Greece all workout for at LEAST 3 hours a day. Talk to Mark Rippletoe from Colorado Springs about how he trains his Olympic weightlifters.
This is true of the best Strongman competitors as well. Marius P. trains for at least half of the day, if not longer.
The more advanced you become, the more you must increase ALL training variables to reach a higher level of fitness. This includes intensity, but also volume and frequency. Therefore, if you want to be good, there is no way your workouts won't get longer in duration.
Now, again, that being said, simply increasing a lame-ass program won't achieve anything. You'll simply be doing a lame-ass program for twice as long.
What kind of workout are you doing? What are your lifts? If your squat is low, THAT should be your main priority, not increasing the length of your workout. If you can't squat anything, then its very likely that you could add a lot more muscle, without spending ANY additional time in the gym.
And by squat, I mean deep, ass-to-ankles, way below parallel squat.