Rooney's 41st-minute breakthrough was brilliantly created and executed after a patient England build-up gathered pace when Leighton Baines crossed for the Manchester United striker, who nodded the ball down and wide of keeper Wojciech Szczesny.
The match was played on a knife-edge as anything other than a win would have consigned England to a potentially difficult two-legged playoff tie, with group rivals Ukraine cruising to an easy win over San Marino.
But midfielder Gerrard sparked English celebrations when he put the outcome beyond doubt in the 88th minute, cutting inside, bursting into the area and poking the ball past Szczesny.
England, unbeaten in their qualifying campaign, finish top of the section with 22 points, with Ukraine, who go into the playoffs, second on 21.
Manager Roy Hodgson, widely criticised after England's 0-0 draw in Ukraine in September, said he had a feeling of great satisfaction - and joked that Gerrard's late goal had taken "about 10 years" off his life.
"It was a tough group. Poland, Montenegro and Ukraine have shown themselves to be very good opponents," Hodgson told ITV.
"I thought the players played some sensational football in the first half, and in the second, when Poland attacked more, they dug in very well and controlled them.
"We've been getting better all the time. We always said if we could get to the last two games we'd be stronger."
Asked how the current team compared with the side beaten on penalties by Italy in the quarter-finals of the European Championship in 2012, Hodgson, who took Switzerland to the 1994 World Cup, said: "I would like to think we are a lot better.
"We've been working together for 18 months and the way we play has changed. We're getting better all the time, and I'd like to think in the months ahead we can get better still, as long as we can keep these players together."
The opening 45 minutes were the most exciting of any England international since the new Wembley re-opened seven years ago, with end-to-end action from both sides and Poland posing a consistent counter-attacking threat.
Cheered on by an estimated 20,000 fans who helped create a thrilling atmosphere often lacking when England are at home, the visitors never let England relax and never stopped looking for an equaliser after the break.
Andros Townsend continued where he left off on his debut against Montenegro on Friday, and he had two good scoring chances, one saved by Szczesny and the other smashed against the bar from 25 yards out.
Baines, marauding down the left, produced excellent crosses for Danny Welbeck and Daniel Sturridge before the Everton full-back's delivery finally paid dividends for Rooney four minutes before half-time.
Poland threatened through Waldemar Sobota and Robert Lewandowski, who seemed set to score after 23 minutes following a swift breakaway before he screwed the ball wide of Joe Hart's left-hand post.
Kamil Glik almost found an equaliser immediately after the break, which set the tone for the second half - Poland playing with a carefree attitude and causing England problems at the back.
But the home side held out, and Hodgson's relief was clear when Gerrard found the net late on after latching on to a lofted pass from substitute Jack Wilshere.
"We had players coming back from injury and we've found an outstanding winger in Townsend, who's played two games as if he's been there all his life," Hodgson said.
"He's going to be under a lot of pressure now...but he's a level-headed young man and he'll deal with it."
Rooney said England were worthy winners. "They had a couple of breaks but we played some great stuff, especially in the first half, and getting that goal gave us the belief and confidence we could go and win it," he told ITV.
"It was the same as the Montenegro game (on Friday) - a big part of our preparation was to be patient, and we fully deserved to win.
"We've always remained positive and had a belief about ourselves and we've gone out and shown tonight we are a good team."
Gerrard was equally pleased but the Liverpool player also sounded a note of caution. "We started really well but the big lesson from tonight, in the second half, is that we have to play better against better teams," he said.
"But we showed that when it gets tough we don't concede goals. We know there's a great togetherness in the squad, we fight for each other and, under tremendous pressure, we've shown we can perform."