There are a lot of good suggestions in this thread. The best way out of this situation is to not be in it in the first place. Which means you have to dictate the Tech pace earlier on in the game. Getting the AI civs at war will slow down their tech pace even more effectively back in the Industrial Age. They'll be slugging it out while you're industrializing and building up. By the time they settle their differences, you'll be far ahead.
And keep them behind: sell them new Techs for maximum gpt. This keeps them poor while allowing you to research at maximum. Be sure, at all costs, that you build the Theory of Evolution wonder. You can then trade or sell your free techs, at your discretion, and maintain your lead.
You do need to be a research powerhouse. That means you need a minimum of 12-15 fully developed cities (size 15+, with libraries, universities, banks, stock exchanges, etc) at standard map size, and 20-25 at large map size. (Large maps require more reseach for each technology.) Plan your cities' locations, and build commercial docks in appropriate cities.
You also need at least 4 or 5 high production cities (more is of course better.) If you get all this set up, you wont have much to worry about in the Modern Age.