The Lord of the Rings actor was awarded the special honour by his The Hobbit: An Unexpected Journey co-star James Nesbitt, who is the university's chancellor.
McKellen took to the podium and revealed how his family's Irish roots shaped his own strict religious upbringing.
He said, "In puritanical Ballymena (Northern Ireland), it is said the park keepers used to tie up the children's swings on Sundays to keep the Lord's Day holy.
"In the same spirit, at our home when I was a kid, we weren't allowed to play cards, nor board games on Sundays. No snap, Ludo or even jigsaws."
He then stood in for Nesbitt and gave the Chancellor's Lecture, using the opportunity to speak about gay rights.