This paper proposes a modified gravity theory where the Gauss-Bonnet (GB) term is replaced by an arbitrary function $ f(G) $, offering a gravitational alternative to dark energy. The theory is shown to pass solar system tests and can describe key features of late-time cosmology, including the transition from deceleration to acceleration, crossing the phantom divide, and current acceleration with effective equation of state parameters (cosmological constant, quintessence, or phantom). The GB invariant $ G $ is topological in four dimensions but becomes significant in higher-dimensional brane-world models and string/M-theory. The modified $ f(G) $ gravity is shown to avoid instabilities present in $ f(R) $ gravity and passes solar system tests for reasonable $ f(G) $ functions. The theory can describe the transition from non-phantom to phantom phases and the crossing of the phantom divide for a wide class of $ f(G) $ functions. Explicit examples of $ f(G) $ are provided, showing that the theory can lead to realistic cosmological dynamics, including late-time acceleration. The paper concludes that modified GB gravity is a promising gravitational alternative to dark energy, passing solar system tests and providing a viable framework for late-time cosmology.This paper proposes a modified gravity theory where the Gauss-Bonnet (GB) term is replaced by an arbitrary function $ f(G) $, offering a gravitational alternative to dark energy. The theory is shown to pass solar system tests and can describe key features of late-time cosmology, including the transition from deceleration to acceleration, crossing the phantom divide, and current acceleration with effective equation of state parameters (cosmological constant, quintessence, or phantom). The GB invariant $ G $ is topological in four dimensions but becomes significant in higher-dimensional brane-world models and string/M-theory. The modified $ f(G) $ gravity is shown to avoid instabilities present in $ f(R) $ gravity and passes solar system tests for reasonable $ f(G) $ functions. The theory can describe the transition from non-phantom to phantom phases and the crossing of the phantom divide for a wide class of $ f(G) $ functions. Explicit examples of $ f(G) $ are provided, showing that the theory can lead to realistic cosmological dynamics, including late-time acceleration. The paper concludes that modified GB gravity is a promising gravitational alternative to dark energy, passing solar system tests and providing a viable framework for late-time cosmology.