After Elsa accidentally hit Anna with her magic they were separated for fear of another incident. However, this fear was what caused Elsa's lack of control over her powers; when she unintentionally froze a window sill in her bedroom King Agnarr gave Elsa a pair of gloves to control her magic. This helped her to some extent, but the outbursts continued as Elsa's powers grew more powerful.
Elsa continued to wear gloves up to the time of her coronation; this would involve removing them to go through the rite of being crowned queen. She took them off once before the ceremony to practice; without the gloves Elsa froze the items she held. At the ceremony, Elsa was reluctant to remove the gloves, and only did so when prompted by the bishop; the gloves stayed off her hands only for the minimum amount of time required, and she was quick to replace them.
Elsa continued to wear her gloves in the great hall. After Anna asked the new queen to bless her marriage to Hans, an argument followed and Elsa walked away. In an attempt to stop her, Anna grabbed her hand and removed her left glove in the process. Elsa tried to retrieve it, but Anna would not listen. This led to Elsa's outburst, and with no glove to stop her powers, they were revealed to the kingdom.
With the remaining glove, Elsa traversed to the North Mountain where she removed it and began to experiment with her powers in her new-found freedom. After this, she never had to wear gloves to conceal her magic again, instead embracing and successfully controlling it.