The promised money will be for emerging fields of research in which the UK excels, such as robotics, artificial intelligence and biotech.
The investment is part of an industrial strategy the government is developing that aims to create and back economic "winners".
Mrs May made the commitment at a speech to the CBI.
She told business leaders that she wanted the UK to be "the global go-to place for scientists, innovators and tech investors".
She cautioned though that although she wanted Britain to continue to attract the brightest and the best scientific talent, it could only continue to do so by bringing immigration down to "sustainable levels".
"Today, Britain has firms and researchers leading in some of the most exciting fields of human discovery. We need to back them and turn research strengths into commercial success," she said.
"That means not only investing more in research and development, but ensuring we invest that money wisely, supporting technologies and sectors that have the potential to deliver long-term benefits for Britain."
The president of the Royal Society, Prof Venkatraman Ramakrishnan, described the announcement as "very welcome".
"This sends out a strong signal to the rest of the world that Britain is determined to be a leading innovative country".
But he said he was concerned that the tighter immigration rules that could be imposed after Brexit would hamper UK research: "An influx of money on its own won't be sufficient in itself if we are to make the best use of this money," he told BBC News.
"We need to hire the best talent. Hopefully a lot of that will be home-grown. But there is no substitute for attracting the best in the world so we can be the best in the world."
There has been a freeze in science spending since 2010. This was seen as a good settlement by the scientific community when the spending of other parts of government was heavily cut in response to the economic crises created by the financial crash of 2008.
But the freeze has meant a gradual erosion in the science budget because of inflation. And this has happened at a time when many other countries have greatly increased their investment in research.
"Our competitors aren't standing still. They are investing heavily in research and development," said Mrs May.
"So in the Autumn Statement on Wednesday, we will commit to substantial real-terms increases in government investment in R&D - investing an extra £2bn a year by the end of this Parliament to help put post-Brexit Britain at the cutting edge of science and tech."
Mrs May also announced a new Industrial Strategy Challenge Fund to direct some of the additional money to address what she described as Britain's "historic weakness" in turning its great world-leading science into commercial success.
The Prime Minister also indicated that there would be tax breaks to encourage firms to invest in research.
"Since 2010, we have made the research and development credit more generous and easier to use - and support has risen from £1bn to almost £2.5bn a year.
"Now we want to go further, and look at how we can make our support even more effective - because my aim is not simply for the UK to have the lowest corporate tax rate in the G20, but also a tax system that is profoundly pro-innovation."
Dr Sarah Main, director of the Campaign for Science and Engineering, said she was "impressed" by the announcement.
"The science community has been waiting to see what the leadership of the government has to say about science and engineering and our future. And this could not be better, coming directly from the Prime Minister. We are seeing a very clear signal of intent that she sees science and engineering being a very big part of our future."
Follow Pallab on Twitter
Prime Minister Theresa May has unveiled plans to invest an extra £2bn a year in science by 2020.