What is the relationship between poverty and terrorism?
Good question! Economists, political scientists, and sociologists are actually still working on this one.
If you just do a raw correlation between a country's income and its incidence of terrorism, there is a negative correlation: Poorer countries tend to have more terrorism. That doesn't prove that poverty causes terrorism, however—it could just as well be that terrorism causes poverty (it's not hard to see why it would be difficult to run a business in a place where suicide bombers are blowing people up), or that some third factor (like a weak or corrupt government) causes both poverty and terrorism.
Further research has generally failed to find a convincing causal link from poverty to terrorism. Terrorists as individuals are usually fairly well-educated, middle-class people, though they are often unemployed and socially isolated.
In addition to the sources at the bottom of my answer, here are some sources to read on the empirical research done on poverty's relationship with terrorism:
Given the current state of uncertainty in the research, I would say we should not dismiss the possibility that poverty contributes to terrorism, and we certainly have plenty of good reasons to want to reduce poverty in any case. Still, there are clearly other causes of terrorism as well, which may be more important. We should not expect that eliminating poverty from a country will be sufficient to also eliminate terrorism there.