A felon isn't generally prohibited from *applying* for a government job;
jobs open to the public are usually available to felons as well. The
problem lies in the type of job vs. the type of felony offense. Obviously
if a person was convicted of financial fraud/embezzlement or something like
that, it could give an employer pause before hiring him/her.
Generally it depends upon the type of felony and specific job but in most cases the answer is no. Exemptions may be made for non-violent felonies such as DUI's but typically they are seen as a security risk and thus would bar you from gaining government employment. You could try to have your record expunged, if enough time has passed.
You can always apply. The majority of positions, though, require you to have no criminal record. There are exceptions, it depends on the job posting. The important thing is to be totally honest about the felony conviction. Trying to hide it will get you denied immediately, being honest will get your application looked at.