This page contains a partial recollection of sources for economic data in various forms. All of them are open-access and many offers interaction through APIs.
IMF data: one of the most comprehensive data set is the World Economic Outlook database, which provides time series on a wide number of countries for macro aggregates.
EUKLEMS: it is a project that provides industry-level time series data for developed countries in a consistent accounting framework.
Fred: the Federal Reserve Bank of St. Louis provides data about a wide range of variables of the US economy, such as GDP, interest rates, financial indicators and monetary aggregates. It is accessible via a handy API as well.
OECD: data from the Organization for Economic Cooperation and Development.
World Bank WDI: the World Development Indicators, big excel file accessible via API as well.
Penn World Table: Real national accounts converted in dollars to provide unified framework and comparability.
Groningen Data: The GGDC 10-Sector Database provides a long-run internationally comparable dataset on sectoral productivity performance in Africa, Asia, and Latin America.
Policy Uncertainty: the Economic Policy Uncertanty index for developed countries, for US it provides also components of the series, which is both news- and data-based. Authored and maintained by Baker, Bloom and Davis.
Bank of Italy's HH financial survey: it provides data on italian households balance sheets, with great deal of details.
Real-time data: the Philadelphia Fed provides real-time data for a number of policy-relevant variables, good for estimations of policy rules in the US economy.
BIS: the Bank of International Settlements provides financial data on a set of countries, along a wide range of dimensions.
BLS: a trove of data on the US economy, also providing granular breakdowns at occupational and frequency levels
FRED-MD & FRED-QD: two massive datasets on a variety of US macroeconomy data, at monthly (MD) and quarterly (QD) frequencies, maintained directly by the St. Louis branch of the Federal Reserve Bank.
Various open data sources: a list of non-economic data from rOpenSci blog that could be use to complement empirical economic work
Besides these very useful and free datasets, there exists a number of database gathering observations at a very granular level. Usually administrative data are free but require a certain amount of paperwork because of the confidentiality issues that might arise; on the other hand there are private companies whose core business is gathering and selling data for a variety of purposes, like Bloomberg, Factset, Bureau van Dijk, Compustat, and so on. If you are lucky enough, your institution has a subscription to those companies and you can get to use their data. If you are really lucky, your institution has a subscription for Wharton Research Data Service, which basically gives access (and bulk download) to all such gated databases.