A number of existing items effectively grant feats, and you can make an item that does anything if your GM allows it, but Pathfinder provides no pricing guidelines for items that grant feats, so they must be benchmarked based on exactly how useful the feat is.
According to the Pathfinder rules on item creation:
Many factors must be considered when determining the price of new magic items. The easiest way to come up with a price is to compare the new item to an item that is already priced, using that price as a guide.
Not all items adhere to these formulas. First and foremost, these few formulas aren't enough to truly gauge the exact differences between items. The price of a magic item may be modified based on its actual worth. The formulas only provide a starting point.
Monte Cook, who designed the D&D 3.5 item creation rules that Pathfinder's item creation rules are based on, takes the opinion that making items which grant feats is possible, and there are several existing items which do just that, but he also says that feats vary considerably in power and must be priced based on exactly how useful they are:
How do you determine the cost and prereqs for making an item that includes a feat or featlike power (ring of evasion, weapon of mighty cleaving).
There is no standard for this. Not all feats or level abilities (like evasion) are equal. Use the existing items as guidelines.
He also notes that the caster does not need to have a feat in order to make an item of it, which you can see in the prerequisites of existing items, although it would be reasonable house rule:
Why is it that the standard items that include featlike powers do not require the creator to possess said feat? Why is it that items imbued with skill bonuses (cloak/boots of elvenkind, gauntlets of swimming and climbing) do not require that the creator have some ranks in the skill being enhanced?
Uh, I guess it's just a matter of personal preference. It seemed that forcing the creator to have the feat or skill usually screwed the player who wants to make the item for himself. This would be a fine, balanced house rule to add the feats and skills (probably at least 10 ranks of the skill) to the prerequisites for such items.
You must also consider that feats are often used as prerequisites for prestige classes and other feats. If they are available cheaply, low-level characters in particular may qualify more easily. However, an item granting a feat means that at least it won't stack with the feat, so at high levels a feat-granting item isn't all that powerful.
In your particular case, Weapon Focus grants a +1 untyped bonus on attacks with one sort of weapon. In pricing it, consider the following:
- It's certainly worth less than 30,000 gp, the price of the pale green prism ioun stone which grants +1 to all attacks, saves and checks, and which stacks with things like a magic weapon's enhancement bonus. That sets an upper limit.
- It's worth at least 5,000 gp, the price a dark blue rhomboid ioun stone would be if it weren't slotless. The item grants a feat, but it's a very weak feat, and Weapon Focus is clearly the more desirable feat.
- According to the combination of the opalescent white pyramid ioun stone and wayfinder combination (with credit to this earlier answer), Weapon Focus is worth exactly 10,500 gp slotted, with the limitation that you can only have one such item.