The Markit/CIPS construction purchasing managers' index rose to 56 from 53.1, its highest level since December 2015. A figure above 50 indicates expansion.
Builders also hired more workers and ordered more supplies to deal with an increase in new projects.
Economists said the sector was recovering after a slow start to 2017.
"A sustained rebound in residential building provides an encouraging sign that the recent a soft patch for property values has not deterred new housing supply," said Tim Moore, senior economist at IHS Markit.
"Instead, strong labour market conditions, resilient demand and ultra-low mortgage rates appear to have helped boost work on residential development projects."
The data contrasts with reports earlier this week suggesting greater caution by homebuyers and lenders.
Building society Nationwide said house prices had fallen for a third consecutive in May - the longest run of decline since 2009, just after the financial crisis.
Meanwhile, the Bank of England said loan approvals fell to a seven-month low in April.
The latest Markit/CIPS construction reading was still much weaker than the post-crisis high of 64.6 seen in January 2014.
However, the survey found there had been solid rises across the whole sector in May, including in civil engineering and commercial building.
Input prices for construction firms also rose at the slowest pace for seven months, despite the prolonged weakness of the pound.
Samuel Tombs, chief UK economist at Pantheon Macroeconomics, said the result suggested the Brexit vote's "dampening influence on construction activity is fading".
But he added: "Note, however, that the PMI has had to exceed 53 in the past to signal growth.
"May's PMI reading, therefore, is consistent with quarter-on-quarter growth in construction output of only about 0.5%."

Ms Leigh won an Oscar for her portrayal of Scarlett O'Hara in the 1939 movie.
Heritage Auctions said the grey jacket and skirt worn by the actress were among 150 items offered by collector James Tumblin.
He originally bought the outfit for $20 from a costume shop.

Average household income rose by 1.4% in 2015-16 after adjusting for inflation, new data from the Department for Work and Pensions (DWP) shows.
Working-age household incomes have been stagnant since 2007-08 compared with a 10% rise for pensioners.
Yet, 14% of pensioners households are still on low incomes.
The DWP figures also show that in 2015-16, rises in pensioner incomes stalled.
A number of reports and previous data have shown that income growth has been faster among pensioners than working-age people since the financial crisis.
This has led to widespread debate over the future of the triple-lock - a promise made to pensioners that the state pension will rise in line with prices, wages or 2.5%, whichever is highest.
This latest set of figures shows that recently retired pensioners in the UK have seen their incomes rise compared with a decade ago.
Average incomes among this group have risen from £314 in 2005-06 to £357 in the last financial year.
The DWP figures show a regional split, with older people in the South East of England having much higher incomes than those living in Wales and the West Midlands.
Steve Webb, a former pensions minister and now director of policy at Royal London, said: "While there are clearly some pensioners who enjoy good company pensions and have benefited from house price inflation, there are clearly also many who are not in such a fortunate position.
"Any change to policy on state pensions need to take full account of the diversity of experience of pensioners in Britain today, and not simply assume that pensioner living standards will keep on rising."
For all UK households, the median average income rose by £8 in a year to £481 a week before housing costs in 2015-16.
This stood at £413 a week after taking housing costs into account, the DWP figures show.
Agnes Norris Keiller, a research economist at the Institute for Fiscal Studies (IFS), said: "Growth in household incomes in 2015-16 was modest but widespread, continuing the pattern seen in recent years.
"The period since the recession has been defined not by sharp rises in inequality or poverty, but historically slow growth in average incomes - in 2015-16 average income for working-age adults was no higher than eight years previously."
Official figures published on Wednesday showed that wage growth had slowed to 2.3% (excluding bonuses) in the three months to the end of January, from 2.6% in the previous three-month period.
Activity in the UK construction sector expanded at its fastest rate in 17 months in May, boosted by a surprise rebound in homebuilding, a survey says.
[NEXT_CONCEPT]
An outfit worn by Vivien Leigh in the film Gone with the Wind has been sold for $137,000 (£91,000) at an auction in California.
[NEXT_CONCEPT]
A generational divide in UK households' income growth has been confirmed in the latest government figures - but incomes are little changed in the last year.