I thought that at this point, Gandalf expected to be with Frodo and would help him give up the ring the same way he helped Bilbo.
I am not sure about that. Frodo was chosen because he was a Hobbit. While they are small people, they are very happy people, with lots of good memories. They are also, wholesome people, not devious, not nasty, not desirous of power - the qualities which Sauron and Saruman use to deceive and ensnare people to their will. Like the saying goes - you cannot cheat an honest man and Frodo and Hobbits in general were honest people.