Gratz is located in northeastern Dauphin County at . It sits along the northern base of Short Mountain, a western extension of Bear Mountain, part of the Ridge and Valley Province of the Appalachian Mountains. Pennsylvania Route 25 passes through the borough, leading east to Interstate 81 and west to Millersburg on the Susquehanna River.