What does Yang-Mills and mass gap problem has to do with mathematics? I'm not very experienced in this topic, but I read a short description of the Yang-Mills existence and mass gap problem, and as long as I understood it has mainly physical consequences and implications. Therefore, I was just curious what it has to do with mathematics? And what are the mathematical and general consequences of a possible solution to it?
 A: Mathematical physics is the study of physical questions from the point of view of full mathematical rigor. Physical questions are phrased as well-defined mathematical problems, to be attacked with methods from differential geometry, functional analysis, Lie groups, topology, etc..
The mathematically rigorous construction of interacting 4-dimensional relativistic quantum field theories is one of the hardest problems of mathematical physics, unsolved since over 50 years, in spite of the continuous efforts of many excellent people. The Yang-Mills quantum field theories are believed to be the most benign ones to be constructed, but the current functional analytic tools were so far not sufficient to produce the bounds needed to show the existence of the appropriate limits.
The techniques developed for an affirmative answer of the existence problem for a Yang-Mills quantum field theory (in the sense required by the Clay Millennium problem) would open a door to a constructive mathematical approach to many other 4-dimensional relativistic quantum field theories, including those describing realistic elementary particle physics. 
Stochastic partial differential equations in 4 dimensions (e.g., fluid flow) pose closely related problems, connected through analytic continuation to imaginary time. Thus the new techniques would also find applications there.
For a synopsis of what in particular needs to be achieved see my review http://physicsoverflow.org/21846 of a failed attempt to solve the problem.
A: There is a long, long list of mathematical subjects that were either pioneered or significantly inspired by results in quantum field theory. However, while physicists may trust the manipulations they do in QFT, and the results of those manipulations have been spectacularly successful, for almost every interesting quantum field theory, there isn't even a rigorous definition or existence proof, much less a justification behind the manipulations that led to the invention of, for example, Seiberg-Witten invariants.
Solving the mass gap problem in Yang-Mills would represent the successful rigorous existence of a very non-trivial quantum field theory and the demonstration of a very nontrivial result about that field theory (that hasn't even been adequately demonstrated using physical techniques). While there probably aren't many direct mathematical consequences to the existence of a mass gap, the techniques involved would almost assuredly be applicable towards the large number of QFT inspired results in mathematics.
A: A geometry (differential say) is essentially about the study of a class of connections on a differentiable fiber area (the E. Cartan's viewpoint). This class is defined in general by imposing that the associated "covariant derivation" preserves a structure; the structure itself is very often represented by a tensor (said structure tensor); the best example being the metric tensor defining a pseudo-riemannian structure on a smooth manifold (when the topological conditions are matched). 
The problem may then arise to seek the canonical form of the associated quadratic form. This problem is essentially equivalent to the search for a suitable frame; i.e, the search for a gauge potential for the group of the rotations of the metric. 
The Yang-Mills equations system is of  Euler-Lagrange type. The action density being a "norm" of the curvature of a class of connections. As a result, the Yang-Mills potential field (in fact, the Yang-Mills connection 1-form), solution of the Yang-Mills equations  is an "extremalization" of a connection in the class of connections, producing by the associated covariant derivation, the Yang-Mills Strength Field. 
This is an account about the fact that Yang-Mills is linked to the search for the best connection (from my viewpoint).
An extremalized connection 1-form  necessarily makes it easier, to approach a "canonical form". With well-designed constraints, it is possible to obtain in principle (I think), the canonical form itself.
This is an account about the fact that Yang-Mills is linked to the search for a canonical form of a given (or even looking for) geometry, would only it be in the case where the geometry is defined by a pseudo-riemannian metric structure. This understood in the sense that we give in paragraph 1.
The answer given by @user1504 to the question [1]  illustrates in a clear way, (being a profane in quantum theory, I could be mistaken), the link between the problem of Mass-Gap and the mathematics, including the holomony, the theory of hilbertian measured spaces... 
However, continuing with the example of the geometry defined by a metric, the quantisation of such theory corresponds to the quantisation of gravitation (at least when the metric is lorentzian). In this context, a link between the Mass-Gap problem and mathematics is the proof by an effective method (quantification method), of the positive mass theorem. The positivity of the mass is intimately linked to the problem of the classification of differential varieties. This classification involves the most sofisticated devices of geometric analysis such as: the  Atiyah-Singer index theorem, the Dirac operators, Seiberg-Witten operators, the variation calculus, the Ricci Flow, ... Cf [2; 3; 4]. 
Note. The positive mass theorem of J. Lohkamp asserts that: under the hypothesis of the dominant energy condition, the total mass for any non-vacuous isolated relativistic gravitational systems should be positive. Cf introduction of [3] for a bright presentation of all of concepts (and very more). It's at this point, I think (and if I well understand the answer of @user1504 given to the question [1]), that a constructive proof (quantised proof) of a positive mass theorem (perhaps without any hypothesis on the energy regime) is linked (is equivalent?) to the Mass-gap problem for the quantised gravity (if any...).
I would like to thank very much @user1504 for his answer to question [1] and for his remark on the previous version of this answer.
The quantum theory seems so fascinating, unfortunately, it falls out of my field of competence (for now).
As I said in the previous version of this answer, these ideas are borrowed from the works of so many geometers that I can not precisely say of whom these ideas are (if I have grasped something about these works). 
However, I will name a few, without any intention to underestimate someone  (by omission): A. Banyaga, R. Bryant, Y. Choquet-Bruhat, D. Christodoulou, P. T. Chrusciel, S. Donaldson, M. Gromov (The Father-Christmas in problems and results of geometry), N. Hitchin, S. Klainerman, C. LeBrun, P. Michor, R. Penrose, S. T. Yau.
That they all, all my recognition and my admiration.
[1 ]Statement of Millenium Problem: Yang-Mills Theory and Mass Gap
[2 ]https://arxiv.org/pdf/1704.05490
[ 3]https://arxiv.org/pdf/1612.07505
[4 ]https://arxiv.org/pdf/1908.10612
