The Sub Tuum praesidium is, without question, one of the most ancient hymns, having been dated to the mid Third Century in its Greek form, which is given above. The Latin version is comparatively recent, dating to the 11th century - about the time of the Battle of Hastings.
It is used in the Roman Liturgy as the antiphon at Compline in the Little Office of Our Lady. It is also in the Raccolta, and is often added to Litanies of Our Lady. It's well worth learning by heart.