McGonagall was born in Edinburgh, the son of an Irish cotton weaver (he wasn't clear about his own date of birth!). One of six siblings, the family moved to Dundee as his father looked for work.
McGonagall himself began work as a handloom weaver at the age of 11. McSmith (2008) suggests that he was a "serious, devout, teetotal family man." He himself had six children and liked, in his spare time, to act in amateur productions at Dundee's Royal Theatre.
In 1877 however a short poem, "Address to Rev. George Gilfillan" was published under Reader's Letters in the Dundee Weekly News. McGonagall had written it. It was the start of a 25 year career penning -and publicly reading- possibly the worst poetry in the English language.
Foster (2005) notes that he gave readings of his poetry to "derisory audiences." he was paid 5 shillings for these public recitals. His mainly working class audience saw him as a "music hall joke." They jeered and threw rotten veg.
McGonagall himself respected those he saw as his social betters. This deference is reflected in his poetry. As for the poor, they needed to be civilised and he blamed their behaviour on drink.
Some of these social betters looked after McGonagall. He made a trip to London and also one to New York thanks to the generosity of rich benefactors.