Speaking outside 10 Downing Street after being appointed by the Queen, she said it would be her mission to “build a better Britain”.
She promised to give people who were “just managing” and “working around the clock” more control over their lives.
Mrs May is the UK’s second female prime minister, after Margaret Thatcher.
Her husband Philip was standing behind her as she made her first public speech in the role, highlighting the “precious bond” between England, Scotland, Wales and Northern Ireland and between “every one of us”.
“That means fighting against the burning injustice that if you’re born poor you will die on average nine years earlier than others,” she said.
For an “ordinary working class family”, she added, “life is much harder than many people in Westminster realise”.
Speaking directly to people who were “just managing”, she said: “The government I lead will be driven, not by the interests of the privileged few, but by yours. We will do everything we can to give you more control over your lives.
“When we take the big calls, we’ll think not of the powerful, but you.
“When we pass new laws, we’ll listen not to the mighty, but to you. When it comes to taxes, we’ll prioritise not the wealthy, but you.
“When it comes to opportunity, we won’t entrench the advantages of the fortunate few, we will do everything we can to help anybody, whatever your background, to go as far as your talents will take you.”
She also paid tribute to her predecessor, David Cameron, saying he had been a “great, modern prime minister”.
Mrs May arrived at Downing Street from Buckingham Palace, where she officially accepted the Queen’s invitation to form a new government.
Earlier the Queen accepted Mr Cameron’s resignation as prime minister.
In his farewell statement outside Downing Street, Mr Cameron said Mrs May would provide “strong and stable leadership” and wished her well in her negotiations on Britain’s exit from the European Union.
Like Mr Cameron, Mrs May campaigned to remain in the EU but has said she will respect the will of the people, as expressed in 23 June’s referendum, saying: “Brexit means Brexit”.
She is expected to announce the makeup of her new cabinet later, with the the key roles of chancellor, home secretary and foreign secretary set to be filled first.
Philip Hammond, who was foreign secretary under David Cameron’s administration, was the first to arrive at Downing Street, followed by ex-London mayor Boris Johnson.
Mrs May, 59, suddenly won the Conservative leadership contest after rival candidate Andrea Leadsom pulled out on Monday.
Labour’s deputy leader, Tom Watson, offered his congratulations to Mrs May but warned she would have to deal with the “enormous economic uncertainty and insecurity” caused by leaving the EU.
He said: “We’ve today had warm words from our new prime minister about the need to stand up for more than a ‘privileged few’.
“The sentiments are good ones but just like her predecessor the rhetoric is much better than the reality.”
London mayor who led the Brexit campaign, foreign secretary in her new government.
He replaces Philip Hammond, who becomes chancellor. Ex-Energy Secretary Amber Rudd has been appointed home secretary.
No 10 said ex-Chancellor George Osborne had resigned from the government.
On arriving at Downing Street, Mrs May vowed to lead a “one nation” government that works for all not just the “privileged few”.
The UK’s second female prime minister promised to give people who were “just managing” and “working around the clock” more control over their lives.
Michael Fallon continues as Defence secretary, and Liam Fox, who resigned as defence secretary in 2011, has a new role as international trade minister.
On Twitter, Mr Osborne, who was chancellor throughout Mr Cameron’s tenure, said it had been a “privilege”, adding: “Others will judge – I hope I’ve left the economy in a better state than I found it.”