Short answers: it depends.
Pain inhibits healing through several mechanisms. According to Nimmo and Duthie as quoted in an article from World Wide Wounds, there are four major problems with severe pain after surgery:
Decreased respiratory movement especially after upper laparotomy or
thoractomy. A decreased functional
lung capacity, difficulty in breathing
deeply and in coughing all contribute
to hypoxia after operation.
Decreased mobility because of pain on movement. Early mobilisation is
more difficult and the risk of deep
venous thrombosis is increased.
Increased sympathetic activity leads to a release of catecholamines
which has adverse effects such as
hypertension followed by myocardial
ischaemia and decreased blood flow to
some tissues.
Hormonal and metabolic activity resulting from surgery and made worse
by pain increases protein breakdown
and mobilisation of free fatty acids.
Reducing pain (through medication or other means) then aids in healing. So taking pain medication would help you heal faster, rather than the other way around.
Having said that, there are questions about the best pain management techniques and methods. Not all medicines are appropriate for all causes of pain. Many people are studying pain management to determine which is the most effective treatment. For example, in a a comparison of three pain medicines/techniques after surgery, researchers found that patient-controlled epidural analgesia was the most effective both in reducing pain and in immune response to the injury. (The other two mechanisms weren't quite as effective in reducing pain, and didn't help the immune system bounce back from the lowered levels after the surgery.)
If some pain medications don't help, it is also possible (although I didn't find human studies to confirm) that a particular pain medication could inhibit healing. Rat studies suggest that Diclofenac inhibits bone healing, as does Celecoxib. (Diclofenac is marketed under the brand names Cataflam and Voltaren. Celecoxib is marketed as Celebrex.)
So the answer to your question would depend on the cause of the pain, the effects of the pain (if it's not inhibiting healing, it's not a problem), and on the effects of the particular pain medication on your condition.