He has served in the Pennsylvania National Guard, and as assistant district attorney for York County. Gilbert is past president of the York County Bar Association and a member of the House of Delegates of the Pennsylvania Bar Association, the Professionalism Committee (past vice-chairman), founding board member of the Susan P. Byrnes Health Education Center, and legal counsel for the National Kidney Foundation - York Chapter.