Is loss in tax revenue a negative externality? I was thinking about how online gambling could cause numerous governments to face a reduction in tax revenue from conventional gambling, upon which taxes do apply in most countries. 

If governments do face such a loss in tax revenue, would such a loss in tax revenue be considered a negative externality?
In my view yes, it would be considered an externality. An externality is said to occur when a production or consumption decision of an individual has an unintended consequence on the consumption or production of someone else.

The analysis of externalities usually does not include governments, considering only production and consumption, but one can think of the government as a firm that produces public goods like law and order and national defense.

In that case the decision of the individual to use online gambling rather than conventional gambling has an unintended effect on the production possibilities for the government. Now that the government has less revenues, it can produce less public goods. 

When a person goes for online gambling rather than conventional gambling they do not intend to reduce the overall provision of public goods, they just went for online gambling because it was more convenient/cheaper etc.