Is 'working' a gerund in the following sentences?
My mobile was not working
He is working hard to pass the examination
When the verb has the force of a noun it is called gerund.
In both of the sentences 'working' is used as a verb (in continuous tense).
a. Working makes me tired. - Gerund
b. He is working in the field. - verb
a. Working hard for the examination fetched him good grades. - Gerund
b. He is working hard for the examination. - verb
In the above sentences (a) 'working' has the force of a noun and it functions as a noun, so it is gerund. While in the sentences (b) 'working' is used as a verb.
"was not working" is past tense continuous/progressive form. It consists of a form of to be and a verb form with the ending -ing. Today grammars say it is a present participle, but if you said it is a gerund (without preposition) it would be just as well.
You can say "I'm working" is "am + present participle" or it is "am + (in the act of) working" or "am (at/on) working". Then it would be a gerund.
Sometimes I write: to be + gp (gerund or participle, whatever you like).