If $g^{-1} \circ f \circ g$ is $C^\infty$ whenever $f$ is $C^\infty$, must $g$ be $C^\infty$? Suppose that $g$ is a bijection on the real line, and $g^{-1} \circ f \circ g$ is a $C^\infty$ function whenever $f$ is $C^\infty$.  It seems howlingly obvious that this can only happen if $g$ is itself $C^\infty$.  But I can't figure out how to prove it. 
Can you help me, Internets?
(Context: I want to show that in a manifold of dimension at least 2, the facts about which unparameterized curves are smooth suffice to determine the differential structure.  I think I can sort of see how to prove this provided I can rely on the claim above, but that's where I'm stuck.  However, if anyone here knows of a proof of the geometric claim, pointers would be most welcome.)
 A: This is a result due to Floris Takens:

Let $\Phi \colon M_1 \to M_2$ be a bijection between two smooth $n$-manifolds such that $\lambda \colon M_2 \to M_2$ is a diffeomorphism iff $\Phi^{-1} \circ \lambda \circ \Phi$ is a diffeomorphism.  Then $\Phi$ is a diffeomorphism.

It can be found in Characterization of a differentiable structure by its group of diffeomorphisms (Math Reviews number: MR552032).  I remember that I found an online version of it (but don't remember where off the top of my head, probably via MathSciNet).  I don't have it in front of me, but I do recall that the argument was fairly involved.  (I found it for a fairly similar reason: I wanted to show that the only Frölicher space with endomorphism monoid $C^\infty(\mathbb{R},\mathbb{R})$ was $\mathbb{R}$ itself, this is Proposition 8.4 of Comparative Smootheology.)

Update: After reading the comments, I realised that the quoted theorem is not quite what is wanted.  Actually, what you need is Proposition 8.4 of Comparative Smootheology, which uses Takens' result at the key stage but nonetheless is about a page long in the proving.  The result in the paper is:

The only Frölicher structures on $\mathbb{R}$ whose endomorphism monoid contains $C^\infty(\mathbb{R},\mathbb{R})$ are the standard, the discrete, and the indiscrete structures.  In particular, the only Frölicher structure on $\mathbb{R}$ whose endomorphism monoid is precisely $C^\infty(\mathbb{R},\mathbb{R})$ is the standard structure.

You can almost replace "Frölicher structure" by "smooth structure" in the above, except that there's no such thing as the "indiscrete smooth structure".  The discrete smooth/Frölicher structure on $\mathbb{R}$ views $\mathbb{R}$ as a load of disjoint points: a zero-dimensional manifold.  This is characterised by the fact that the only smooth functions $\mathbb{R} \to \mathbb{R}_{disc}$ are the constant functions (here the unadorned $\mathbb{R}$ is the usual manifold $\mathbb{R}$).  The indiscrete structure is the opposite: the only smooth functions $\mathbb{R}_{indisc} \to \mathbb{R}$ are the constant functions.  So we could rephrase the above result as:

The only smooth structures on $\mathbb{R}$ whose endomorphism monoid contains $C^\infty(\mathbb{R},\mathbb{R})$ are the standard and the discrete structures.  In particular, the only smooth structure on $\mathbb{R}$ whose endomorphism monoid is precisely $C^\infty(\mathbb{R},\mathbb{R})$ is the standard structure.

Let us connect that to your question.  You ask:

If $g \colon \mathbb{R} \to \mathbb{R}$ is a bijection such that $g^{-1} \circ f \circ g$ is $C^\infty$ whenever $f$ is $C^\infty$, must $g$ be $C^\infty$?

First, we can use $g$ to put a smooth structure on $\mathbb{R}$ by post-composing $g$ with charts (or pre-composing with $g^{-1}$ if your charts go from your manifold).  Let us write this as $\mathbb{R}_g$.  For clarity, let us write $\mathbb{R}_s$ for the standard smooth structure on $\mathbb{R}$.  Then $g \colon \mathbb{R}_s \to \mathbb{R}_g$ is a diffeomorphism, by construction.  Given a smooth function $f \colon \mathbb{R}_s \to \mathbb{R}_s$ we get a smooth function $f_g \colon \mathbb{R}_g \to \mathbb{R}_g$ by $g \circ f \circ g^{-1}$.  Conversely, given a smooth function $h \colon \mathbb{R}_g \to \mathbb{R}_g$, $g^{-1} \circ h \circ g$ is smooth on $\mathbb{R}_s$ and thus is $C^\infty$.  Hence the endomorphism monoid of $\mathbb{R}_g$, $C^\infty(\mathbb{R}_g,\mathbb{R}_g)$, is $g C^\infty(\mathbb{R}_s,\mathbb{R}_s) g^{-1}$.
The condition imposed is that $g^{-1} \circ f \circ g \in C^{\infty}(\mathbb{R},\mathbb{R})$ for all $f \in C^\infty(\mathbb{R},\mathbb{R})$.  The $\mathbb{R}$s here are $\mathbb{R}_s$ in our notation.  Translated into a single statement (rather than one for each $f \in C^\infty(\mathbb{R},\mathbb{R})$, this is: $g^{-1} C^\infty(\mathbb{R}_s,\mathbb{R}_s) g \subseteq C^\infty(\mathbb{R}_s,\mathbb{R}_s)$.  Now here's the sneaky bit; the inclusion here is going the wrong way.  So we simply apply $g \circ  - \circ g^{-1}$ to both sides to get $C^\infty(\mathbb{R}_s,\mathbb{R}_s) \subseteq g C^\infty(\mathbb{R}_s,\mathbb{R}_s) g^{-1}$.
Now we apply my result to deduce that $\mathbb{R}_g$ must be either the discrete smooth structure (which it isn't) or the standard one: $\mathbb{R}_g = \mathbb{R}_s$.  But then $g$ is a diffeomorphism $\mathbb{R}_s \to \mathbb{R}_g = \mathbb{R}_s$ and hence is $C^\infty$.
