I doubt many people can dispute the United States' scientific, economic, and industrial achievements, as well as the many freedoms it grants its citizens. However, personally, I can't call it a great country. I think it has a lot of great aspects, like the OP mentioned, but also a lot of glaringly bad ones.
When I think of great countries, the first ones that come to mind aren't ones that are responsible for hundreds of thousands of deaths in needless wars overseas, in addition to having two warmongers as their primary presidential candidates. When I think of terrible countries, the first ones that come to mind aren't responsible for humanity's first instance of setting foot on the Moon, exploring Mars and Pluto, or having many of the world's best universities, among other things.
I think the U.S. is the definition of a bittersweet country. The country that invaded Afghanistan and Iraq is also the country that invaded the Moon and Mars. The country that enabled George W. Bush and Dick Cheney to hold power is also the country that has enabled thousands of scientists to have the best education in the world and given them the necessary means to conduct their research. The country that has many ardent civil rights movements is also the country that has a sizable number of Trump supporters.
Personally, I think the U.S. is capable of removing the "bitter" from its "bittersweet" status. It seems to me that the country's major resources have just been in the wrong hands for a long time. If that changes—and I believe it could change not very far into the future—then I think the U.S. will have more than become a great country, perhaps the greatest country, even, in more ways than it currently is (like higher education, space research, etc.).