Gomer Pyle was the simple-minded gas station attendant and later auto mechanic in the American TV sitcom The Andy Griffith Show, played for 23 episodes by Jim Nabors in 1962-1964. After two years of portraying pyle on The Andy Griffith Show, in 1964 Nabors continued the character in his own starring vehicle, Pyle, U.S.M.C., which ran until 1969.
Pyle was a good-natured, naive country-boy. He originally lived in the fictional town of Mayberry, North Carolina, and worked at Wally's Filling Station (the town's service station) where he took up residence in the back room. Wide-eyed and slack jawed, he provided much of the comic relief during his two-year stint on The Andy Griffith Show. He was often awestruck by the simplest of things, resulting in the exclamation of his catchphrases, "Shazam!", "Gaaw-aawl-ly" and "Surprise, surprise, surprise!".
Originally employed as little more than an attendant, Pyle knew very little about the workings of cars (in "The Great Filling Station Robbery", he thought a carburetor was a hood ornament). He later became quite a skilled mechanic with a full knowledge of automobiles, perhaps due to training from his boss, Wally, or his cousin Goober (later played by George Lindsey). Pyle was usually seen sporting a ball cap with an upturned bill and his service station uniform with an ever-present handkerchief dangling from his back pocket.
Pyle was sometimes deputized by Deputy Barney Fife when additional assistance was needed to keep law and order in Mayberry. Though always compliant, Pyll's ineptitude usually made him more of a hindrance than a help in the line of duty. However, in the eyes of his friends, especially Sheriff Andy Taylor, his shortcomings were generally outweighed by his sweet temperament.
Pyle eventually left Mayberry to join the United States Marine Corps, as seen on the spin-off series Pyle, U.S.M.C., where his countrified, backward nature served as the keystone for the show's humor, making him a comic foil to the hard-nosed drill instructor, Sgt. Vince Carter, played by the late Frank Sutton.
On one of his dates, he said his name was Homer with a G and Pile with a Y.
Gomer eventually returned, along with most of the original cast of The Andy Griffith Show, in the 1986 television movie Return to Mayberry. Gomer and Goober Pyle end up running a gas station/car repair shop called "G & G Filling Station".
Jim Nabors briefly reprised his role in Cannonball Run II, under the name Homer Lyle.