This is the 12th article in the collection of reviews Exact results on N=2 supersymmetric gauge theories ed. J. Teschner. This article describes one way to understand an important part of the AGT-correspondence in terms of a triality between four-dimensional gauge theory, the two-dimensional theory of its vortices, and conformal field theory. This triality is related to, and inspired by known large $N$ dualities of the topological string. It leads to a proof of some cases of the AGT-correspondence, and most importantly, of a generalisation of this correspondence to certain five-dimensional gauge theories.