Both words come out of the grain harvest. They just come from opposite ends of the field.
Gleaning happened after the reapers had gone through. You walked the stubble and picked up the ears they'd dropped, and it was work for people who didn't own the crop. Leviticus 19:9 tells farmers not to reap the corners of their fields or gather the gleanings, and that law is the background to Ruth gleaning behind Boaz's workers in the Book of Ruth. If you've seen Millet's The Gleaners (1857), that's three women stooped over a field somebody else already harvested.
A garner was where the grain went: the granary. English had it by the late 1100s, from Old French gernier, a variant of grenier, from Latin granarium, a storehouse for grain (granum). Granary is the same Latin word borrowed again in the 1500s, so garner and granary are doublets. The verb, "to store grain," doesn't turn up until the late 1400s.
The modern senses kept that split better than I thought they would. You glean from a source that wasn't made to hand you the thing, like a hint from someone's tone, or the card's "insights from the research papers" (nobody wrote those papers for her). You garner what piles up on your own side, and often it comes to you instead of you going out for it. A film garners reviews. A candidate garners votes. "The film gleaned praise" sounds wrong to me, and so does "I garnered from his tone that he was annoyed."
Here's the part that surprised me. Etymonline records the figurative glean, "to gather by acquisition, scrape together," in English before the literal "gather grain left by the reapers," which it puts in the late 1300s. I can't tell you why. My guess is that English picked the word up from people who already used it both ways, but that's only a guess. Before Late Latin glennare nobody really knows; Etymonline calls it of unknown origin, perhaps Gaulish.
So when I say I gleaned something, I picture myself in somebody else's stubble, which is why I'd never say I gleaned a compliment.