Yes–but you'll need a hardware upgrade and some third party software.
Continuity relies on two pieces: Bluetooth and Wi-Fi. These need to be "correct" to work.
Check your iMac to see what Wi-Fi chip you have. To do this, open up System Profiler and look under Wi-Fi. If you have an Atheros chip like this teardown by iFixit shows, you'll need to replace it with a Broadcom BCM94360CD chip. If, however, you have a Broadcom Wi-Fi chip, you can choose to either replace it with the same board, or you can simply install a Bluetooth 4.0 dongle. If you do decide to use a dongle, note a few things:
- Bluetooth 4.0 dongles based on the Cambridge Silicon Radio CSR8510 A10 chip won't work. Try to use dongles based on the Broadcom BCM20702 chip, which are similar to the ones used by Apple, such as the Asus BT400, IOGEAR GBU521 and GMYLE
- Instant Hotspot currently doesn't work reliably when using a dongle.
Once you've done that, use the Continuity Activation Tool to activate Continuity with your upgraded Mac: just run the app! Note, as always with third party hardware that works on a low level, you should use this with some caution. Make sure you have a backup (just for good caution), and nothing is 100% guaranteed. With that said, it's a very reputable tool, so I wouldn't be too afraid.