What it means
To hear it on the grapevine means you found something out through gossip, whispers, or people passing it along, not from anything official. It has that fuzzy little maybe-cloud over it, because by the time news crawls through enough mouths, it's usually picked up a few extra sequins.
Usage examples
"I heard it on the grapevine that they're closing the old factory, but nobody's said anything official yet."
"I heard on the grapevine that they're closing the old factory next year."
"Don't quote me, but on the grapevine they say she's getting the promotion."
"I heard it on the grapevine that Jay's moving out, but I'm waiting for him to say it with his own face."
"You didn't get this from me, but the grapevine says the manager's about to quit."
Where it comes from
It goes back to the American Civil War, when people compared fast-moving rumor networks to a grapevine telegraph. The image stuck because the lines of gossip felt twisty, messy, and unofficial. By the late 19th century, hear it through or on the grapevine was already being used for news picked up second-hand.