Sum of two periodic functions
Here is a counterexample. Let $a, b, c \in \mathbb{R}$ be linearly independent over $\mathbb{Q}$. Let $\text{span}(x, y, z, ...)$ be the $\mathbb{Q}$-vector space in $\mathbb{R}$ spanned by $x, y, z, ...$. Let $AB = \text{span}(a, b), BC = \text{span}(b, c), AC = \text{span}(a, c)$. And for a subset $S$ of $\mathbb{R}$, let $\chi_S$ denote the characteristic function of $S$. Now define
$\displaystyle f(x) = \chi_{AB} - 2 \chi_{BC}$
and
$\displaystyle g(x) = 3 \chi_{AC} + 2 \chi_{BC}.$
Then $f$ has period set $\text{span}(b)$, $g$ has period set $\text{span}(c)$, and $f + g$ has period set $\text{span}(a)$. (I am not sure if the coefficients are necessary; they're just precautions.)
Are you still interested in the continuous case?
(Old answer below. I slightly misunderstood the question when I wrote this.)
Here is a simpler example. I claim that the function $h(x) = \sin x + \sin \pi x$ cannot possibly be periodic. Why? Suppose an equation of the form
$\sin x + \sin \pi x = \sin (x+T) + \sin \pi (x+T)$
held for all $x$ and some $T > 0$. Take the second derivative of both sides with respect to $x$ to get
$\sin x + \pi^2 \sin \pi x = \sin (x+T) + \pi^2 \sin \pi(x+T).$
This implies that $\sin x = \sin (x+T)$ and that $\sin \pi x = \sin \pi(x+T)$, which is impossible.
(Or is the question whether the sum can be periodic?)
Pick a basis $B$ of $\mathbb R$ as a $\mathbb Q$ vector space, and split it into two non-empty disjoint parts $B_1$ and $B_2$. Define $\mathbb Q$-linear maps $f,g:\mathbb R\to\mathbb R$ such that $f(x)=x$ and $g(x)=0$ if $x\in B_1$, $f(x)=0$ and $g(x)=x$ if $x\in B_2$. Then $f(x)+g(x)=x$ for all $x\in B$, so that in fact $f+g=\operatorname{id}_{\mathbb R}$, which is not a periodic function. Morever $f$ and $g$ are periodic, and their sets of periods are precisely $B_1$ and $B_2$. Since $B_1\cup B_2$ is linearly independent over $\mathbb Q$, it is easy to see that $x/y\not\in\mathbb Q$ whenever $x\in B_1$ and $y\in B_2$.
This is then an example where the sum is not periodic.
If each function has a smallest period, and otherwise fits the conditions, then a proof may be forthcoming by attempting to compute the smallest period of the sum and failing. However, things become unclear if there is no smallest period, as in the case of the characteristic function of the rationals. Progress might be made in this case by decomposing such a function as an infinite sum of periodic functions, or at least give more counterexamples to study. (e.g. Write the characteristic function of the rationals as an infinite sum of functions of smallest period 1. )