In the past few years, Global Navigation Satellite Systems (GNSS) based attitude determination has been widely used thanks to its high accuracy, low cost, and real-time performance. This paper presents a novel 3-D GNSS attitude determination method based on Riemannian optimization techniques. The paper first exploits the antenna geometry and baseline lengths to reformulate the 3-D GNSS attitude determination problem as an optimization over a non-convex set. Since the solution set is a manifold, in this manuscript we formulate the problem as an optimization over a Riemannian manifold. The study of the geometry of the manifold allows the design of efficient first and second order Riemannian algorithms to solve the 3-D GNSS attitude determination problem. Despite the non-convexity of the problem, the proposed algorithms are guaranteed to globally converge to a critical point of the optimization problem. To assess the performance of the proposed framework, numerical simulations are provided for the most challenging attitude determination cases: the unaided, single-epoch, and single-frequency scenarios. Numerical results reveal that the proposed algorithms largely outperform state-of-the-art methods for various system configurations with lower complexity than generic non-convex solvers, e.g., interior point methods.