Primary research gain is from number of cities and level of cities. If you are not expanding enough you will fall behind. If you are not leveling your cities fast enough, you will fall behind.
Infrastructure comes next. Building Unrest reduction reducing buildings will give you the full research gain from your cities. Building +research buildings in conclaves will give a massive boost.
Followed by Inspiration Enchantment if you have access to it. Exploring fast and aiming for lost libraries if available.
You need to remember trading for research usually comes with losses. If you trade enough with everyone you SHOULD come out on top. but I think all you'll end up doing is being tied for equal top with each player that has the highest research. While making them catch up with research that is lacking.
For research goals try not to waste time on things that take too long, so if you are yet to expand, aim for all the easier researches, that way you can benefit from them ASAP, then go for the better ones once their research time is more manageable. Build Conclaves even if there is no/low essences bonus instead of a town, since you can throw libraries and other research buildings into it.
I hope that helped or helped you narrow down what it is you need help with. More information would be useful.