Federal law bans those who have been convicted of certain crimes from ever possessing firearms. Included in those crimes are all felonies and misdemeanor domestic violence offenses. (The law also prohibits those subject to domestic violence restraining orders from having a gun.) (18 U.S.C. § 922(g) (2013).)
State law often overlaps with the federal ban. For example, in California, convictions for misdemeanor domestic violence offenses bar offenders from owning or possessing guns within 10 years of conviction. (Cal. Penal Code § 29800 et seq. (2013).)
Federal law allows for the restoration of gun possession rights if the conviction in question has been expunged or set aside, or if the person has been pardoned or had civil rights restored. But if the action that would otherwise reestablish the right to gun possession explicitly provides that it doesn’t, then the person still cannot have a gun. Plus, it's possible to have the right to firearms restored under state law but still be subject to the federal prohibition.
There is also a procedure by which people can seek exemption from the federal prohibition, and, depending on the circumstances, state law may provide for the equivalent.
Whether expungement or similar relief will restore the right to possess a gun under state law depends on the underlying offense and, of course, the jurisdiction.
To learn how the law applies to your specific situation, speak with a knowledgeable criminal defense lawyer. The rules on gun ownership and possession can be complex—they can also change.