Does the body have a gate control for pain
Pain receptors, more precisely pain signal propagation, can be inhibited in several ways. One is, for example, fine touch receptors (mechanoreceptor in illustration) inhibit propagation of pain signal in spinal cord (a lot of pain processing happens in spinal cord):



That is why humans often rub skin around or nearby injury, whether it is in joints or something more superficial. You should find more information about such control in any textbook on pain. See this page for short primer.

Next, pain propagation is modulated -- still in spinal cord -- by descending pathway from brain and brain stem. See this page for more, or address Kandel's textbook.

Now, I don't know whether or not it is identified how/where brain "selects" to what pain pay attention. My hypothesis is that it happens by competition, e.g. several signals compete by inhibiting each other via some mechanism, probably, related to stress-induced analgesia.