There are three types of Xbox accounts: local, free, and Gold. (Gold Family accounts work the same as individual Gold accounts for purposes of this question.)
With a local account, you can track your progress locally and move your profile from console to console using a USB stick (or memory card if you have an older console that uses them), but you cannot play online, and if something happens to your profile locally, it's gone. This is the account under which you initially obtained those achievements.
With an Xbox Live free account (formerly called Silver) or a Gold account, you track your progress locally as before, but your profile is also synched with Microsoft's servers, so you can recover it to other consoles without using a memory device, and any achievements that are synched to the servers will be saved, even if your console dies.
Microsoft doesn't say anything officially about upgrading a local account to an Xbox Live account, but there are suggestions elsewhere that it can be done. The best suggestion seems to be to sign into your local (offline) profile and then sign up for Xbox Live there. If your gamertag isn't already used by another Xbox Live member, then this should convert your gamertag to an XBL profile and retain your achievements. (Note that achievements earned when offline will not have a date stamp; this applies whether or not they are associated with an XBL profile.)
It may be possible that Xbox Support could give you instructions to merge your offline and online profiles after the fact, but that would most likely require you to upgrade the offline profile and then have Xbox Support merge the two online profiles ... that is not a process I would recommend, as it could go wrong in any number of ways, like making you pay for two Xbox Live Gold profiles and not giving you a refund once they fail to merge the two, or merging them in the wrong direction and overwriting the achievements you had.
As TZHX suggests, the locked achievements are most likely the result of those games storing your progress locally and assuming that you were credited with the achievement when you reached that point in the game. Deleting the saves for those games should fix the problem, because you got them with an offline profile and thus there is nothing online for them to be incompletely synched with. Note that you may have to sign in with the offline profile to delete the saves.