Yes - that was a specific change Pathfinder made from the 3.5 rules. All benefits of stat increases are retroactive.
The stat enhancers from magic items are treated differently - the skill(s) is set within the item itself, so your +4 INT Headband might grant ranks in Knowledge History and Use Magic Device, for example. IIRC, these would override, not supplement, any ranks the character has in the skills.
I suppose nothing would stop you making a variety of Headbands, each with different skills, but the benefits would only kick in after wearing the specific one for a day.