The law that asserts 1+1=2 is essentially the law of identity - that is this is this; this is why it is neccessarily true. To specify a context for this is to be more particular about what we are identifying and how.
In Liebniz's ontology it is the law of indiscernibles which he first wrote about in the Discourse on Metaphysics; it is typically understood as:
no two [distinguishable] objects can have the same properties
This seems eminently reasonable: if two objects are distinguishable then they must differ in one or more properties. We can say then:
an object is uniquely determined by its properties
The question then becomes is this law universally valid? Are there conceptual schemes in which it can be weakened?
On the face of it, 1+1 is not equal to 2; they look different; however the context supplies a proof that the first can be altered into the second, and back; this is why I say essentially rather than exactly in my first sentence. One could say in a certain language that they are homotopic (to make this precise - we are moving into the realm of homotopy type theory from type theory)
Hence Leibnizs law though essentially true, is not exactly true; and this can be made more formal. In Set Theory, choosing ZF for precision, Leibnizs law is translated into the axiom of extensionality:
A set is determined uniquely by its members.
The correspondance between this and my restatement of Liebnizs law is obvious.
It is possible to take a different line, and this grew out of the notion of isomorphism in algebra; that is two objects can be essentially indistinguishable for all purposes yet they may be different; this notion finds its correct context in category theory; and in fact, ideally higher category theory.
Essentially all of mathematics (as currently understood) can be geometrised: Geometry and algebra are dual. For example, the integers, the archetypical algebra is geometrised (by Grothendieck) through his notion of schemes - and in this language one can talk about coverings, bundles and curvature.
Given this insight it is not surprising that there are non-euclidean geometries; they just happened to be the first to be discovered.
Hence the truths of Euclidean Geometry are neccessarily true as one has specified this geometry in the space of all geometries; but when think of the modality of neccesity in Kripke or Lewis's possible world semantics where a truth is neccesarily true when it is true in every world - then one should say they are contingently true.
I would also say that this duality (that of geometry to algebra) is natural to us as we see (thus geometry) and touch (thus counting). In this sense the physical immediacy of the world, the way it is present to us - that is phenomenologically - is what determines these two categories of mathematical understanding that are so intimately related to each other; in this line of thought it is a philosophical error to remove both the world and consciousness to understand number and geometry. In this sense, geometry is contingent on this world and on the structure of consciousness. This isn't surprising here - as this view grew out of Kantian philosophy where it is an essential starting point.