Are you trying to buy an iTunes gift certificate online that you can either download and print or email to someone? Are you getting this error? “This Apple ID is not currently eligible to purchase gift certificates. You can purchase iTunes Gift Cards from a variety of retail locations.”
It seems that Apple has been limiting certain accounts due to all of the fraud that has been happening lately. Hackers were stealing peoples passwords and buying gift certificates that they were selling on eBay or the black market.
In order for your Apple ID to be eligible automatically you need to purchase something with your credit card from an Apple Retail store on apple.com. Others have had success with removing all credit cards from the account and then adding one at the time of purchasing your iTunes Gift Certificate.