A lucky coincidence.
When Harry et al. are talking to Hagrid about the night he bought Norbert, Hagrid explains that he met a shady character who was interested in Fluffy, and got Hagrid to spill the beans:
“Well - yeah - how many three-headed dogs d'yeh meet, even around Hogwarts? So I told him, Fluffy's a piece o'cake if yeh know how to calm him down, jus' play him a bit o'music an he'll go straight off ter sleep-”
They (correctly) surmise that this is somebody trying to sweet-talk Hagrid, and work out how to get past Fluffy. They take this information to Professor McGonagall, who tells them that Dumbledore has just left for the Ministry of Magic.
They guess that this isn't an accident; plans are afoot:
“It's tonight,” said Harry, once he was sure Professor McGonagall was out of earshot. “Snape's going through the trapdoor tonight. He's found out everything he needs, and now he's got Dumbledore out of the way. He sent that note, I bet the Ministry of Magic will get a real shock when Dumbledore turns up.”
I don't think it's clear whether this was actually a fake note (Dumbledore isn't explicit about this), but it gets their attention.
This is a very lucky piece of plot coincidence. It's been a while since Hagrid got rid of Norbert, and even longer since he would have seen Quirrell in the pub. If they'd gone to Dumbledore just a day earlier, they'd never have known he was out of the castle and that somebody might be making an attempt on the trapdoor.