Our purpose is to study the family of simple undirected graphs whose toric ideal is a complete intersection from both an algorithmic and a combinatorial point of view. We obtain a polynomial time algorithm that, given a graph G, checks whether its toric ideal P G is a complete intersection or not. Whenever P G is a complete intersection, the algorithm also returns a minimal set of generators of P G . Moreover, we prove that if G is a connected graph and P G is a complete intersection, then there exist two induced subgraphs R and C of G such that the vertex set V(G) of G is the disjoint union of V(R) and V(C), where R is a bipartite ring graph and C is either the empty graph, an odd primitive cycle, or consists of two odd primitive cycles properly connected. Finally, if R is 2-connected and C is connected, we list the families of graphs whose toric ideals are complete intersection.