It's possible to open a lock at a later attempt if the lock difficulty is close to your skill, there's a little random factor involved. But most of the time your skill is so high or low compared to the lock difficulty that you succeed at the first attempt or can't succeed no matter how often you try, it's pointless trying more than 5-10 times in a row, return when her skill is higher.
Each time Imoen levels up you can assign 20 thieving skill points for her. Use them to raise her lockpicking skills, with 45 she should be able to pick a few locks, with 65 most of them and 75-85 should be perfect until the end.
There's also the option to drink potions in order to raise her dexterity or thieving skills temporarily.
If you get the failed message you're doing the right thing but Imoen's skill is too low.