This last year I've been in graduate school has been really depressing.
I thought I was capable of doing math(as an undergraduate I did OK), but I'm finding that I'm not able to solve homework and exam questions well. My grades are quite bad except for a few areas that I'm interested in.
I keep getting told by professors and other grad students that doing homework and doing research are different things so doing bad in class right now does not guarantee I'll fail as a researcher. But still I'm not sure.
I haven't even been given the chance to experience research. I'd hate to give up on something even before trying it, but I also can't afford that time to stay in grad school for a few more years if my future will not be promising. Which do you think is wise? Try studying for a bit more or just give up to save the time.
It is true that problem solving and problem making (part of research) are different tasks, and one can be good at problem solving but poor at research. One of the most brilliant undergraduate math students I ever worked with (at one of America's most elite liberal arts colleges) went on to graduate school at one of the top-five math departments and found the difference between problem solving and problem identification so large that he left math altogether. A few research mathematicians are careless calculators and would do poorly on traditional tests.
To understand problem making, consider Fermat's Last Theorem. Fermat surely didn't solve his conjecture, but stated a problem to be solved. One gets immersed in a discipline and keeps asking question after question. You'll find some of the questions you've posed have already been answered. You'll find other questions are either trivial and shed no light on any other aspect of mathematics. But a superb question is hard (but not too hard), illuminates issues elsewhere in mathematics, and requires new useful techniques to be developed. (See Hilbert's famous 23 problems.)
I wouldn't presume to give strong recommendation here except to suggest you find out WHY you're not doing well on problem solving. Simple calculation errors? Conceptual problems? Lack of focus? Inability to visualize?...
Then speak with professors candidly about your interests and background, and heed their words. Faculty WANT you to succeed.
As for the comment request seeking more information on problem making, I recommend you search Youtube on my name, TEDx, and "How to ask good questions."