As a graduate of an anesthesiology resiency, yes, you need to pass both the written and oral boards before you qualify to sit for the ABA pain boards. It is important to be board certified in your primary specialization in order to maintain staff privileges at many hospitals. Your ability to get affordable malpractice insurance may also be affected.
Of note, some try to get around the whole process by applying for board certification through "other" organizations such as the American Board of Pain Medicine. I would caution against this as it is not recognized by the American Board of Medical Specialties. Only boards that oversee a primary specialty (anesthesia, neurology, psychiatry and PMR) can administer a pain board exam that will lead to ABMS recognition and thus real board certification. Perhaps one day those other bords will be recognized but for now, they are not.