Why does ATP inhibit glycogen synthase?
Firstly, I will put across main points so that it will be easy to understand this complex control mechanisms of the enzymes involved in both processes:

Glycogen synthase control

Control of glycogen metabolism is effected via reciprocal regulation of glycogen phosphorylase and glycogen synthase. Thus, activation of glycogen phosphorylase is tightly linked to inhibition of glycogen synthase, and vice versa.

Both glycogen synthesis and breakdown are exergonic under the same physiological conditions. If both pathways operate simultaneously, however this is deemed to be wasteful hydrolysis of UTP. 

Glycogen phosphorylase and glycogen synthase therefore must be under stringent control such that glycogen is either synthesized or utilized according to cellular needs.
Regulation involves both allosteric control and covalent modification, with the latter being under hormonal control.


  Glycogen synthase also exists in two distinct forms that can be
  interconverted by the action of specific enzymes: active,
  dephosphorylated glycogen synthase I (glucose- 6-P–independent) and
  less active, phosphorylated glycogen synthase D (glucose-6-
  P–dependent). Glycogen synthase, is activated by G6P.When there is
  high demand for ATP (low [ATP], low [G6P], and high [AMP]), glycogen
  phosphorylase is stimulated and glycogen synthase is inhibited, so
  flux through this pathway favours glycogen breakdown.


Why is this so?

ATP also binds to the allosteric effector site, but in the T state, so that it inhibits rather than promotes the T-R conformational shift.
Having said that here is an illustration of control of glycogen phosphorylase activity;




  The enzyme may assume the enzymatically inactive T conformation or the
  catalytically active R form. The conformation of phosphorylase b is
  allosterically controlled by effectors such as AMP, ATP, and G6P and
  is mostly in the T state under physiological conditions. In contrast,
  the modified form of the enzyme, phosphorylase a, is largely
  unresponsive to these effectors and is mostly in the R state unless
  there is a high level of glucose.


Exactly this situation occurs in glycogen metabolism through the opposition of the glycogen phosphorylase and glycogen synthase reactions.

Another point to note is that glycogen synthase is regulated by covalent modification through complex cyclic cascade. For more information, please see here: Glycogen Metabolism

If you need more clarification don't hesitate to put in comments. Hope it helps

References


Biochemistry (Grisham)
Biochemistry (Voet and Voet)
Harper’s Illustrated Biochemistry