In ancient Rome the Praetorian Guard - in Latin Praetoriani (the Praetorians) - was a military unit which had responsibility for protecting the emperor and his family.
During the final two centuries of the Roman Republic it was customary for a Roman general to have a bodyguard (known as a cohors praetoria (praetorian cohort)), and in 27 BCE the first emperor, Augustus, brought the various praetorian cohorts together to form the Praetorian Guard, a military unit of several thousand men whose function was to protect the emperor and his family. Its privileged position close to the emperor conferred considerable power on the Praetorian Guard and its commander (or praefectus (prefect)), and over the centuries it played a critical part in several (successful and unsuccessful) attempts to replace a reigning emperor or, on an emperor’s death, to determine the succession. The Praetorian Guard was also notoriously corrupt: those wishing to gain access to the emperor would often resort to bribery to achieve their end. The Praetorian Guard was abolished early in the fourth century by the emperor Constantine (reigned 312-327).
Nowadays the expression praetorian guard (usually without initial capitals) is sometimes used (often ironically or jocularly) to refer to the group of, e.g., aides and advisers attached to a prominent public figure (such as a government minister) and having, amongst their responsibilities, that of controlling access to their principal, i.e., acting as gatekeepers.