I worked out for many years as a teen in my basement at home with decent results. I was able to "tone", but not able to put on significant weight or size. Besides the fact that I was limited by my knowledge at the time, I was also limited by equipment. I had no olympic size bars or weights, only regular size, along with regular adjustable dumbbells. I basically had one adjustable bench with a leg extension attachment (and later a butterfly attachment) with which to do all of my work. This was a nice learning experience, but by the time I was 18 and starting my second semester as a freshman in college, I finally joined an actual gym. At first I was intimidated, but eventually I relaxed, and as the years went by, I really came to appreciate the greater benefits.
First and foremost, the gym was a place with a variety of equipment. This immediately opened up new options of what I was able to do (though I attempted to improvise what I couldn't necessarily do when I was at home - and there are obviously people with relatively well stocked home gyms, but this is rare). Another difference, while not seemingly as significant, particularly if you currently enjoy working out at home, is the atmosphere. There's nothing like a good gym atmosphere. The noise, from the grunts of exertion to the loud music, is an ingredient that you can't really appreciate until you experience it--something that fires you up. Finally, of the things that are most readily apparent, is the presence of other people. Whether serving as inspiration for a physique you might want to achieve or reassurance that you're in better shape than someone else and you should keep on going, there's nothing quite like being around others. You can also learn new and unusual exercises just by discreetly watching these other people in the gym. This is a great complement to books and videos because these movements are being performed with the equipment at your gym. I've learned several effective movements and variations that I probably wouldn't have otherwise known about by simply watching.
With all of this in mind, the gym is far superior to the home in my eyes. Assuming you can keep the bull-shit with others and distractions (such as sexy outfits on great bodies) to a minimum and get in there and work, you can reap the gym's many benefits. I respect the hell out of anyone who actually gets up the courage and determination to go to the gym consistently, but that respect drops considerably if they're there to socialize or just go through some half-hearted motions on a couple of machines, never generating anything resembling intensity, never getting any results. For heaven's sake, if you make the effort of going, then make the effort of making it count!