If we’re just talking about England, and not Scotland, Wales or Ireland… well, it not only depends to which year you set the dial on your time machine, but where you go too. Local dialects could vary enormously.
Strong local dialects with their own rich vocabularies remain well within living memory. After all, the modern English we know today is very much the creation of radio, TV and movies.
But your success would also depend on who you were talking to. Communicating with a lawyer or local aristocrat would be easier than conversing with a peasant.
Then there’s how well-read you are. The King James Bible, contemporaneous with Shakespeare, but with a much smaller vocabulary and written to be understood by ordinary folk, suggests we’d get by well enough in Tudor or Stuart London. Go back to the Middle Ages, though, and things are harder. If you’re up on your Chaucer and, say, Langland’s Piers Plowman, you could survive – as long as the locals speak slowly and you anticipate unexpected pronunciations. If you’ve done Beowulf at A-level, and if you have a smattering of conversational German, Dutch, or one of the Scandinavian languages, you’d pick up Old English in Anglo-Saxon times reasonably quickly. Any earlier than that and you might just muddle by if you’re fluent in Welsh or Gaelic, but you’d need a good phrase book.