The gap between the price of a new and used vehicle is as wide as it has been in years, pushing an increasing number of consumers to the used-car lot and putting pressure on auto makers to deepen discounts on new cars to keep them competitive.

Demand for used cars was unusually strong this summer and will remain at elevated levels through the year’s end as higher interest rates and rising prices on new cars continue to stretch buyers’ wallets, industry analysts said.

Used-car buyers are finding a growing selection of low-mileage vehicles that are only a few years old.

While used-car values have also increased in recent years, the gap between the price of a new and preowned car has also widened and is now at one of its largest points in more than a decade, according to car-shopping website Edmunds.com.

New-car prices have steadily climbed in the years following the recession as companies packed vehicles with more expensive technology and buyers shifted away from lower-priced cars to bigger and more expensive sport-utility vehicles and trucks. The average price paid for a car hit an all-time high of $36,848 in December of 2017 and remains at near-record levels, according to Edmunds.com.

“Customers forget a new car is now more than $30,000 and they expect it to be $20,000,” said Brian Allan, a senior director at Galpin Motors Inc., a Southern California dealership chain.

“When people see the price has gone up, it is sticker shock, especially when people only buy a car every five to six years,” Mr. Allan said.

At the same time, the used-car market is being flooded with leased cars being returned to dealerships, increasing the supply and options for buyers looking for two- and three-year-old vehicles that are generally well maintained.

And unlike in recent years, where the selection on the used-car lot has tilted toward slow-selling sedans, dealers are offering more of the crossover and sport-utility vehicle models that are in hot demand now.

The customer who would never consider buying used before is now driving off the lot in a preowned vehicle, Mr. Allan said.

With nearly 40 million in sales last year, the used-car market is more than double the size of the new-car business.

The shift in demand is a troubling sign for auto makers, which will be under pressure to deepen discounts to keep customers from defecting to the used-car market. New-vehicle sales have started to cool this year following a seven-year growth streak.

As new car prices have climbed, auto lenders have kept monthly payments low by extending loan-repayment terms to five and six years and introducing 0% financing on loans that made buying new a more attractive deal.

But as interest rates rise and credit tightens, auto companies are pulling back on such sales incentives. The average monthly payment on a new car was $536 in August, up from $507 last year and $463 five years ago, according to Edmunds.com.

Justin Scholz, a 35-year-old banker, was stunned by the new-car sticker prices when he went shopping this spring for a new SUV for his growing family. He had been eyeing the Lexus RX hybrid but felt the $66,000 price tag was unusually high. He looked for 0% finance deals and couldn’t find many out there.

“In the past, I entertained new because you could get a 0% interest rate for 60 months,” he said. “New was a small premium compared to used. Now, the gap is much bigger.”

Rather than splurge, Mr. Scholz decided to try his luck in the used-car market, where he found a two-year-old version of the same vehicle that had recently been returned after a lease. It had fewer than 30,000 miles and was more than $20,000 cheaper than the new vehicle.

Mr. Scholz bought the vehicle in April for $44,000 and has no plans to return to the new-car market soon.

Newsletter Sign-up The 10-Point. A personal, guided tour to the best scoops and stories every day in The Wall Street Journal. PREVIEW

Auto retailers sold 10.4 million used cars in the second quarter this year, according to Edmunds.com, the highest quarterly volume it has on record since the firm began tracking preowned sales in 2007.

Used-car prices are also up, defying expectations that the influx of off-lease cars would depress values. Prices have been rising in part due to a slowdown in repossessions and vehicles coming off rental-car fleets—two sources of used cars that are typically older and less expensive.

Buyers paid an average of $22,489 for a three-year-old used car in the second quarter of 2018, up $865 from the prior-year period, according to Edmunds.com. That is still well under the average $35,828 paid for a new car last quarter.

Dealers are also putting more resources and investment into promoting their used-car sales as a way to offset declining margins in the new-car business.

The profit margin on a used-car sale was nearly 7% last year, more than double the return on a new-vehicle sale, according to the National Automobile Dealers Association, giving dealers more incentive to steer buyers to their preowned selection.

AutoNation Inc., the U.S.’s largest dealership chain, opened its first used-car center last year, aiming to capture more of the preowned business as U.S. demand for new cars and trucks cools.

“We’re offering a more attractive product at a better price,” said AutoNation Chief Executive Officer Mike Jackson, referring to the chain’s used-car offerings.

Write to Adrienne Roberts at Adrienne.Roberts@wsj.com