Low-dimensional electron systems, as realized naturally in graphene or created artificially at the interfaces of heterostructures, exhibit a variety of fascinating quantum phenomena with great prospects for future applications. Once electrons are confined to low dimensions, they also tend to spontaneously break the symmetry of the underlying nuclear lattice by forming so-called density waves; a state of matter that currently attracts enormous attention because of its relation to various unconventional electronic properties. In this study we reveal a remarkable and surprising feature of charge density waves (CDWs), namely their intimate relation to orbital order. For the prototypical material 1T-TaS2 we not only show that the CDW within the two-dimensional TaS2-layers involves previously unidentified orbital textures of great complexity. We also demonstrate that two metastable stackings of the orbitally ordered layers allow to manipulate salient features of the electronic structure. Indeed, these orbital effects enable to switch the properties of 1T-TaS2 nanostructures from metallic to semiconducting with technologically pertinent gaps of the order of 200 meV. This new type of orbitronics is especially relevant for the ongoing development of novel, miniaturized and ultra-fast devices based on layered transition metal dichalcogenides.