The basics are:
1. Build granary and then library as soon as possible
2. Build every available food building you can (but keep your civ happy)
3. Beeline down tradition to the growth policies at least and ideally finish it for free aqueducts
4. Build the national college as soon as you possibly can, rushing/buying/chopping libraries as you need to go get it done -- ideally by turn 80 no later than 100
5. On tech, beeline to civil service (for the food) and then education
6. Get universities up in all your cities as soon as you possibly can
7. Keep specialists working in the universities
8. Settle all great scientists until public schools
9. Beeline to public schools and get them up in at least your main science buildings
10. Take rationalism as soon as it is available and run the whole tree
And during all of this obviously send traderoutes to whoever has higher science, and use your spies to steal techs. Oh, and don't let the city manager assign your citizens, do it yourself, to make sure that they are working all the good food tiles, working any great tiles, and working in the universities. If you HAVE to use the city manager, put it on science focus, and still at least check what it is doing now and then and fix its mistakes.
If you do all that you will be a science juggernaut no matter what civ you play.
On King you should surpass them pretty quick. On higher difficulty levels the above formula might not make you the science leader until around public schools or maybe even later.