Is "the master gland" connected to the brain?

Pituitary gland. Yes, the pituitary gland is attached through the brain through the pituitary stalk which connects to the hypothalamus. This gland controls most of the major hormones in your body.
Yes. The "master" gland aka pituitary gland is located behind the frontal lobe of the brain and is physically connected to the brain by the pituitary stalk.