It's same as the expression 'By gum' which is used in many other parts of the country - Ee bah gum is just A northern way of pronunciation of it.
It's a 'minced oath' meaning 'By God'.
A minced oath is something you use when you, for instance, drop a hammer on your foot and don't want to swear in front of the children or granny.
It's what's known as a 'minced' oath, i.e. one that you use when you don't want to swear e.g. in front of children. It means "By God!" which is inoffensive these days, but was much more serious in previous times when it would have been considered "taking the Lord's name in vain".
I don't think it has been in common useage in the North for over a century. Other than crap southern comedians taking the p*ss on television, I have never heard the expression used for real in the wild.
I could be wrong here but I suspect it's still used in places like Yorkshire and I wouldn't say it's used instead of swearing as boxtops and Mark have suggested. In can be used in several ways as in if a girl asks her boyfriend .'Do I look nice in this?' He would reply,'Ee bah gum lass thou looks a treat.'
By 'eck is also used like this.
Similarly, 'Jings, crivvens, help ma Boab' - familiar to the Sunday Post readers of the 'Oor Willie' cartoons, translates as 'Jesus, Christ, help me God'.
missprim, it would originally have been a substitute for swearing but has come to be part of the language in its own right along with heck, what the dickens and golly gosh and so on.
When I first started out as a teacher, in 1970s Accrington, I thought the kids were extracting the michael as they regularly referred to 'yon lad', 'o'er yon'....and even talking to one who had been taken poorly and findin he'd had 'pobbies' for breakfast.
It was like setting your watch back 50 years.
nescio, could you explain why you think my post is patronising and why do you think I know nothing on the subject? I did say at the beginning of my post that I could be wrong but don't feel that I am 'not the sharpist knife in the box' as Zhukov insists.Please put me right on the subject.