There are a lot of threads out there regarding this but essentially you need a city with a good ammount of surplus food, thus the "farm". Then you need to run specialists in that city. To run specialist you are going to need certain buildings for example libraries so you can assign scientists. For every specialist you assign you get 3 GP points so the more you can assign the faster you get GP. Another way to run a lot of speicalist is to use the caste system civic (unlimited artist, merchant, and scientist). Again there is a lot more strategy to it than this but this should help you get a start.