Assuming that they don't have any sort of cloaking technology, the various space agencies will have probably seen them before they reached Earth. We have a LOT of satellites orbiting the Earth, and lots of signals going back and forth. It would get in the way of something, and would be noticed.
If it somehow managed to crash land without a space agency seeing it (or an air traffic control tower seeing it), it basically becomes a question of "How long would it take for word of an actual UFO crash to reach the government?" However, it also depends on how obvious it is that it's an alien spaceship. Long story short, though, in this day and age, not very long.
The main issue here is that while we don't have evidence of extraterrestrial life, we likely have protocols in place for contact scenarios. And I'm sure that one of the scenarios that have been considered is "Alien spaceship crashes on Earth".
Let's play out one hypothetical scenario.
Late at night: Farmer Brown is awoken by a loud noise (the sonic boom caused by the ship entering the atmosphere). We're looking for worst-case scenario, so he ignores it and goes back to sleep.
0500: Farmer Brown wakes up, remembering the big noise from last night but dismissing it. After all, he's not crazy!
0800: Farmer Brown is doing morning maintenance checks. He makes it out to the far reaches of his farm and... What the hell is that? A big burning hunk of metal...
0805: Farmer Brown calls local law enforcement to report that something has crashed in his farm. He hangs up, takes a picture, and posts it to Facebook.
0830: Law enforcement shows up. It doesn't look like any airplane they've seen, but since they can't find any bodies no alarm bells are immediately run. They take some blood samples to try and identify who was on board.
1000: The lab technician calls his boss down to his office. "What the hell is this sample? Those are not red blood cells. In fact, I'm not sure what they are."
1005: Lab tech's boss is confused too. He puts in a call to his friend, a tech in the nearest big city. Emails are exchanged, data is sent, and a sample starts being driven.
1200: The sample arrives. Big city lab tech decides to take a late lunch because the data was interesting and he wants to see it for himself.
1215: He's confirmed it's something weird, called his boss, and his boss's boss. They're all confused. Boss's boss goes to the chief, who pulls a favor with the local FBI office.
1300: An FBI lab tech shows up with a few higher ups, confirm that it isn't blood. They nod at each other behind their sunglasses, one with a microphone in his ear steps out of the room while pulling out a cell phone.
1330: The IT division at the FBI has found Farmer Brown's Facebook page; the picture of the crash is confirmation. The director has been pulled out of a meeting and briefed; he has an unscheduled meeting with the President in half an hour. Field teams are being dispatched to the crash site.
1500: The field teams have arrived at the crash site. They provide final confirmation that this is not human in origin. But there's blood-equivalent on the floor... That means that whatever the ship belongs to is wandering the countryside. The area is sealed, and teams are dispatched to search the surrounding area for signs of the aliens.
See, the biggest difference between now and the old alien crash site stories is that now we have instant communication across the entire country. In the past, we'd need Farmer Brown to get back to his house to call the sheriff, wait at home to meet the sheriff to show him where it was.... It takes a lot less time to pull out your cell phone.
So, long story short, I'd say that the government would likely find out in less than a day, even less if we can skip a few steps (ie the sheriff wakes up when the ship crashes and goes to investigate). Two or three days at max, but that's pushing it.