The Knights Templar have origins in the Middle Ages as protectors of Christian pilgrims on their way to Jerusalem. Many legends have grown up around this mysterious group, including a connection to the Holy Grail. In the late 18th Century the Freemasons adopted some Knights Templar rites and symbols (some believe there is a connection between the two groups). This explains why Knights Templar symbols found in cemeteries relate to the Freemasons. The symbol here shows a Maltese cross surrounding a cross inside a crown.
The gravestone below shows three Freemason related symbols, from left to right: Freemason, Knights Templar, Shriners.
Photos: Gravestone of Samuel A. Bonesteel (1842-1902), Fairmount Cemetery, Denver, Colorado