As a hymn ended and prayers began at a special service for teen-agers this evening at a Baptist church in Fort Worth, a man with a semiautomatic handgun walked in and began firing, killing six people in the church before turning the gun on himself. An eighth person died later at a hospital, officials said.

Lieut. David Ellis of the Fort Worth Police Department said three teen-agers and three adults were shot to death inside the church in the city's southwest corner. Lieutenant Ellis also said that a pipe bomb exploded on a balcony inside the church sanctuary after the 7 P.M. shooting and that the department's bomb squad was inspecting several suspicious packages found at the church.

''There's cartridges, shrapnel and empty cart boxes and blood splattered all over the wall,'' Lieutenant Ellis was quoted by The Fort Worth Star-Telegram as saying.

Lieutenant Ellis said there was a bulge in the gunman's chest and that bomb disposal officers in protective suits would try to cut open his clothing to look for an explosive device. Because of the potential danger, he said, the victims' bodies had not been removed from the church last night.