For the most basic at-home gym, the minimum size is the space you need to move freely in all directions from a fixed point. In other words, if you're 6 feet tall, you'd want a 6- to 8-foot square to move within, assuming there aren't any greater equipment-based needs.
When choosing an at-home gym, consider the space (floor and ceiling room) you have available for the equipment you'll be purchasing, and then estimate how much additional space you need to comfortably use the equipment.
For instance, some of the mirror compact home gyms, like the NordicTrack Vault, require almost zero space to install (you simply hang the unit on the wall), but you still need to have enough open space in front of the mirror to follow along with the workouts and use any additional equipment (like dumbbells, mats, or kettlebells).