Topological quantum field theories give important insight into various deep problems of mathematics. In the beginning of these lectures I give an introduction to topological quantum field theories in various space-time dimensions relevant to Gromov-Witten theory, Donaldson theory, Chern-Simons theory and quantization of various moduli spaces. Topological strings, Kodaira-Spencer theory and related topics will also be introduced. I conclude with a review of recent results about the relation between quantum gauge theories based on Higgs bundles and double affine Hecke algebras. Appearance of Bethe Ansatz equations, the topic previously well developed in the theory of integrable systems, in the above topological gauge theory plays the central role and turns out to be related to many ideas from recent studies of the geometric Langlands correspondence.