Gandalf and Thorongil were battling the Corsairs fleet 40 years before the War of the Ring (2979).
As for your earlier comments about rings of power and their danger, except for the one ring, it seemed to me that magic rings were not nearly as dangerous to the bearer as that ring turns out to be. And it's likely Gandalf thought that a magic ring in the possession of a hobbit, who would not likely use it for anything beyond just disappearing, would not be a problem. There also seems to be something about the fact that no one who is not being extraordinarily tempted by the ring ever thinks it would be okay to just take the ring away from either Bilbo or Frodo. Perhaps Gandalf didn't feel it was appropriate for him to take the ring away in the first place, and he did not truly realize the danger. By the time he spoke to Frodo of the perilous nature of rings of power, he understood more fully what they were dealing with, but perhaps what was "perilous" to humans and/or elves he didn't think would be a problem to a hobbit...
Okay, it's a bit of a stretch, but it's the best I can come up with. ;) I do think that Gandalf had no idea of the corrupting power of the ring that Bilbo possessed until Bilbo's birthday and he saw all the Gollum-like symptoms. In the movie, I thought they (and particularly Ian Holm) did a wonderful of job of pointing to that, because Bilbo literally turned into another person during that scene. It was truly a Jekyll-Hyde moment. Until then, I honestly don't think Gandalf thought there was any lasting effect or danger to Bilbo in possessing the ring. Then the ring passed to Frodo, and Gandalf spent the next several years trying to find Gollum to find out where the ring came from in the first place.
All rings of power might be "perilous" but Bilbo was no pushover--he had a lot of strength of character and knowledge and goodness in his own right. Maybe Gandalf figured he was up to the task...and he would have been, if it had been an ordinary, garden-variety ring of power.