In an interview with Film Comment (via Cinephilia & Beyond), Scorsese said he didn't believe the mafiosos in "Goodfellas" thought about their actions. To capture this on screen, he tried to make them "as primitive as possible. Just straight ahead. Want. Take. Simple." This approach to the characters explains the parallel between the film's opening and closing scenes.
During the opening scene, Henry's narration begins with the line "As far back as I can remember, I always wanted to be a gangster." Following this line, Henry closes the trunk of a car, the frame zooms and freezes on his face, and then Tony Bennett's "Rags to Riches" roars over the movie's titles.
In the final scene of the film, before title cards and credits roll, Henry ends his narration saying "I'm an average nobody. Get to live the rest of my life like a schnook." He then enters the home the FBI placed him in and closes its door on the viewers.
The parallels between the narration's open and its close mirror the audiences' journey with Henry. At the beginning, audiences are thrust into the car with Henry as he drives down the road to being a gangster. At the end, Henry leaves the audience outside his new life and home. He was a gangster, now he is a schnook. The ride's over and Henry is out of the life he loved.